Make local sequence number tracking optional.

This commit is contained in:
Stefan Thomas
2012-11-23 10:45:02 -08:00
parent ffa923daf5
commit e64526c0da
2 changed files with 4 additions and 2 deletions

View File

@@ -189,6 +189,7 @@ var Remote = function (opts, trace) {
this.trusted = opts.trusted;
this.websocket_ip = opts.websocket_ip;
this.websocket_port = opts.websocket_port;
this.local_sequence = opts.local_sequence;
this.id = 0;
this.trace = opts.trace || trace;
this._ledger_current_index = undefined;
@@ -714,12 +715,12 @@ Remote.prototype.submit = function (transaction) {
});
}
else {
if (!transaction.tx_json.Sequence) {
if (self.local_sequence && !transaction.tx_json.Sequence) {
transaction.tx_json.Sequence = this.account_seq(transaction.tx_json.Account, 'ADVANCE');
// console.log("Sequence: %s", transaction.tx_json.Sequence);
}
if (!transaction.tx_json.Sequence) {
if (self.local_sequence && !transaction.tx_json.Sequence) {
// Look in the last closed ledger.
this.account_seq_cache(transaction.tx_json.Account, false)
.on('success_account_seq_cache', function () {

View File

@@ -21,6 +21,7 @@ exports.servers = {
'rpc_port' : 5005,
'websocket_ip' : "127.0.0.1",
'websocket_port' : 5006,
'local_sequence' : true,
// 'validation_seed' : "shhDFVsmS2GSu5vUyZSPXYfj1r79h",
// 'validators' : "n9L8LZZCwsdXzKUN9zoVxs4YznYXZ9hEhsQZY7aVpxtFaSceiyDZ beta"
}