historic sync working yay :D
This commit is contained in:
parent
86a4ce96ad
commit
789388af3c
3 changed files with 5 additions and 3 deletions
|
|
@ -317,7 +317,8 @@ Wallet.prototype._onAddressBook = function(senderId, data, isInbound) {
|
||||||
|
|
||||||
|
|
||||||
Wallet.prototype.updateTimestamp = function() {
|
Wallet.prototype.updateTimestamp = function() {
|
||||||
this.lastTimestamp = new Date().getTime() * 1000;
|
this.lastTimestamp = (new Date().getTime()) * 1000;
|
||||||
|
this.store();
|
||||||
};
|
};
|
||||||
|
|
||||||
Wallet.prototype._onData = function(senderId, data, isInbound) {
|
Wallet.prototype._onData = function(senderId, data, isInbound) {
|
||||||
|
|
@ -330,7 +331,6 @@ Wallet.prototype._onData = function(senderId, data, isInbound) {
|
||||||
this.log('badMessage FROM:', senderId);
|
this.log('badMessage FROM:', senderId);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.updateTimestamp();
|
this.updateTimestamp();
|
||||||
|
|
||||||
switch (data.type) {
|
switch (data.type) {
|
||||||
|
|
@ -362,6 +362,7 @@ Wallet.prototype._onData = function(senderId, data, isInbound) {
|
||||||
this._onAddressBook(senderId, data, isInbound);
|
this._onAddressBook(senderId, data, isInbound);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
Wallet.prototype._onConnect = function(newCopayerId) {
|
Wallet.prototype._onConnect = function(newCopayerId) {
|
||||||
|
|
|
||||||
|
|
@ -104,6 +104,7 @@ WalletFactory.prototype.read = function(walletId, skipFields) {
|
||||||
obj.privateKey = s.get(walletId, 'privateKey');
|
obj.privateKey = s.get(walletId, 'privateKey');
|
||||||
obj.addressBook = s.get(walletId, 'addressBook');
|
obj.addressBook = s.get(walletId, 'addressBook');
|
||||||
obj.backupOffered = s.get(walletId, 'backupOffered');
|
obj.backupOffered = s.get(walletId, 'backupOffered');
|
||||||
|
obj.lastTimestamp = s.get(walletId, 'lastTimestamp');
|
||||||
|
|
||||||
var w = this.fromObj(obj, skipFields);
|
var w = this.fromObj(obj, skipFields);
|
||||||
return w;
|
return w;
|
||||||
|
|
|
||||||
|
|
@ -321,7 +321,7 @@ Network.prototype.start = function(opts, openCallback) {
|
||||||
|
|
||||||
var hostPort = this.host + ':' + this.port;
|
var hostPort = this.host + ':' + this.port;
|
||||||
this.socket = io.connect(hostPort, {
|
this.socket = io.connect(hostPort, {
|
||||||
reconnection: false,
|
reconnection: true,
|
||||||
});
|
});
|
||||||
this._setupConnectionHandlers(openCallback);
|
this._setupConnectionHandlers(openCallback);
|
||||||
var pubkey = this.getKey().public.toString('hex');
|
var pubkey = this.getKey().public.toString('hex');
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue