init return cb rpc

This commit is contained in:
Matthew Zipkin 2017-05-01 05:05:23 +00:00
parent 6acef06cbc
commit 6a332bfeaf
2 changed files with 2 additions and 0 deletions

View File

@ -2594,6 +2594,7 @@ RPC.prototype.blockToJSON = co(function* blockToJSON(entry, block, details) {
version: entry.version,
versionHex: util.hex32(entry.version),
merkleroot: util.revHex(entry.merkleRoot),
coinbase: block.txs[0].inputs[0].script,
tx: txs,
time: entry.ts,
mediantime: mtp,

View File

@ -623,6 +623,7 @@ Block.prototype.getJSON = function getJSON(network, view, height) {
ts: this.ts,
bits: this.bits,
nonce: this.nonce,
coinbase: this.txs[0].inputs[0].script,
txs: this.txs.map(function(tx, i) {
return tx.getJSON(network, view, null, i);
}, this)