commit
3f7ea8ebcd
@ -287,21 +287,21 @@ BlockTemplate.prototype.createCoinbase = function createCoinbase(hash) {
|
||||
|
||||
// Reserved size.
|
||||
// Without segwit:
|
||||
// CB weight = 500
|
||||
// CB weight = 504
|
||||
// CB stripped size = 125
|
||||
// CB size = 125
|
||||
// Sigops cost = 4
|
||||
// With segwit:
|
||||
// CB weight = 724
|
||||
// CB weight = 728
|
||||
// CB stripped size = 172
|
||||
// CB size = 208
|
||||
// Sigops cost = 4
|
||||
if (!this.witness) {
|
||||
assert.strictEqual(cb.getWeight() + padding * scale, 500);
|
||||
assert.strictEqual(cb.getWeight() + padding * scale, 504);
|
||||
assert.strictEqual(cb.getBaseSize() + padding, 125);
|
||||
assert.strictEqual(cb.getSize() + padding, 125);
|
||||
} else {
|
||||
assert.strictEqual(cb.getWeight() + padding * scale, 724);
|
||||
assert.strictEqual(cb.getWeight() + padding * scale, 728);
|
||||
assert.strictEqual(cb.getBaseSize() + padding, 172);
|
||||
assert.strictEqual(cb.getSize() + padding, 208);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user