rpc: some more gbt fixes.
This commit is contained in:
parent
1a3dcbd277
commit
ff80620e5e
@ -1188,7 +1188,7 @@ RPC.prototype._createTemplate = co(function* _createTemplate(version, coinbase,
|
|||||||
dep = index[input.prevout.hash];
|
dep = index[input.prevout.hash];
|
||||||
if (dep != null && deps.indexOf(dep) === -1) {
|
if (dep != null && deps.indexOf(dep) === -1) {
|
||||||
assert(dep < i);
|
assert(dep < i);
|
||||||
deps.push(dep);
|
deps.push(dep + 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1264,7 +1264,9 @@ RPC.prototype._createTemplate = co(function* _createTemplate(version, coinbase,
|
|||||||
weightlimit: undefined,
|
weightlimit: undefined,
|
||||||
longpollid: this.chain.tip.rhash() + util.pad32(this.totalTX()),
|
longpollid: this.chain.tip.rhash() + util.pad32(this.totalTX()),
|
||||||
submitold: false,
|
submitold: false,
|
||||||
coinbaseaux: undefined,
|
coinbaseaux: {
|
||||||
|
flags: attempt.coinbaseFlags.toString('hex')
|
||||||
|
},
|
||||||
coinbasevalue: undefined,
|
coinbasevalue: undefined,
|
||||||
coinbasetxn: undefined,
|
coinbasetxn: undefined,
|
||||||
default_witness_commitment: undefined,
|
default_witness_commitment: undefined,
|
||||||
@ -1304,9 +1306,6 @@ RPC.prototype._createTemplate = co(function* _createTemplate(version, coinbase,
|
|||||||
weight: tx.getWeight()
|
weight: tx.getWeight()
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
json.coinbaseaux = {
|
|
||||||
flags: attempt.coinbaseFlags.toString('hex')
|
|
||||||
};
|
|
||||||
json.coinbasevalue = attempt.getReward();
|
json.coinbasevalue = attempt.getReward();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user