segwit support
Use tx ID if it exists, else continue to use tx hash
This commit is contained in:
parent
1b8c7086be
commit
7894c4713e
@ -23,6 +23,9 @@ var BlockTemplate = module.exports = function BlockTemplate(jobId, rpcData, pool
|
|||||||
|
|
||||||
function getTransactionBuffers(txs){
|
function getTransactionBuffers(txs){
|
||||||
var txHashes = txs.map(function(tx){
|
var txHashes = txs.map(function(tx){
|
||||||
|
if (tx.txid !== undefined) {
|
||||||
|
return util.uint256BufferFromHash(tx.txid);
|
||||||
|
}
|
||||||
return util.uint256BufferFromHash(tx.hash);
|
return util.uint256BufferFromHash(tx.hash);
|
||||||
});
|
});
|
||||||
return [null].concat(txHashes);
|
return [null].concat(txHashes);
|
||||||
@ -136,4 +139,4 @@ var BlockTemplate = module.exports = function BlockTemplate(jobId, rpcData, pool
|
|||||||
}
|
}
|
||||||
return this.jobParams;
|
return this.jobParams;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user