This commit is contained in:
Christopher Jeffrey 2016-10-23 03:24:32 -07:00
parent be86757ee8
commit 3c48124658
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD
3 changed files with 28 additions and 3 deletions

View File

@ -245,9 +245,9 @@ SPVNode.prototype.rescan = function rescan() {
* @returns {Promise}
*/
SPVNode.prototype.scan = co(function* scan(height) {
SPVNode.prototype.scan = function scan(height) {
return this.walletdb.rescan(this.chain.db, height);
});
};
/**
* Broadcast a transaction (note that this will _not_ be verified

View File

@ -418,7 +418,7 @@ MerkleBlock.fromRaw = function fromRaw(data, enc) {
MerkleBlock.prototype.toFull = function toFull(writer) {
var p = BufferWriter(writer);
var i, tx;
var i, tx, index;
this.toRaw(p);

View File

@ -299,6 +299,31 @@ function cmpid(a, b) {
return a.id - b.id;
}
function parseWallets(data) {
var p = new BufferReader(data);
var wids = [];
while (p.left())
wids.push(p.readU32());
return wids;
}
function serializeWallets(wids, writer) {
var p = new BufferWriter(writer);
var i, wid;
for (i = 0; i < wids.length; i++) {
wid = wids[i];
p.writeU32(wid);
}
if (!writer)
p = p.render();
return p;
}
/*
* Expose
*/