Merge pull request #211 from pinheadmz/cbtxt
return coinbase scriptSig string in getblock requests
This commit is contained in:
commit
27b896a4ed
@ -2644,6 +2644,7 @@ RPC.prototype.blockToJSON = co(function* blockToJSON(entry, block, details) {
|
|||||||
version: entry.version,
|
version: entry.version,
|
||||||
versionHex: util.hex32(entry.version),
|
versionHex: util.hex32(entry.version),
|
||||||
merkleroot: util.revHex(entry.merkleRoot),
|
merkleroot: util.revHex(entry.merkleRoot),
|
||||||
|
coinbase: block.txs[0].inputs[0].script,
|
||||||
tx: txs,
|
tx: txs,
|
||||||
time: entry.ts,
|
time: entry.ts,
|
||||||
mediantime: mtp,
|
mediantime: mtp,
|
||||||
|
|||||||
@ -623,6 +623,7 @@ Block.prototype.getJSON = function getJSON(network, view, height) {
|
|||||||
ts: this.ts,
|
ts: this.ts,
|
||||||
bits: this.bits,
|
bits: this.bits,
|
||||||
nonce: this.nonce,
|
nonce: this.nonce,
|
||||||
|
coinbase: this.txs[0].inputs[0].script,
|
||||||
txs: this.txs.map(function(tx, i) {
|
txs: this.txs.map(function(tx, i) {
|
||||||
return tx.getJSON(network, view, null, i);
|
return tx.getJSON(network, view, null, i);
|
||||||
}, this)
|
}, this)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user