rpc: do not use weight pre-segwit (see 9fc7f0b).
This commit is contained in:
parent
70d4de39ce
commit
e49e877f17
@ -1686,8 +1686,8 @@ RPC.prototype.__template = co(function* _template(version, coinbase, rules) {
|
||||
maxtime: block.ts + 7200,
|
||||
expires: block.ts + 7200,
|
||||
sigoplimit: consensus.MAX_BLOCK_SIGOPS_COST / scale | 0,
|
||||
sizelimit: consensus.MAX_RAW_BLOCK_SIZE,
|
||||
weightlimit: consensus.MAX_BLOCK_WEIGHT,
|
||||
sizelimit: consensus.MAX_BLOCK_SIZE,
|
||||
weightlimit: undefined,
|
||||
longpollid: this.chain.tip.rhash() + util.pad32(this._totalTX()),
|
||||
submitold: false,
|
||||
coinbaseaux: {
|
||||
@ -1699,6 +1699,13 @@ RPC.prototype.__template = co(function* _template(version, coinbase, rules) {
|
||||
transactions: txs
|
||||
};
|
||||
|
||||
// See:
|
||||
// bitcoin/bitcoin#9fc7f0bce94f1cea0239b1543227f22a3f3b9274
|
||||
if (attempt.witness) {
|
||||
json.sizelimit = consensus.MAX_RAW_BLOCK_SIZE;
|
||||
json.weightlimit = consensus.MAX_BLOCK_WEIGHT;
|
||||
}
|
||||
|
||||
if (coinbase) {
|
||||
tx = attempt.coinbase;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user