Merge pull request #3 from bitspill/patch-2

bump size to include floData
This commit is contained in:
Sky Young 2018-10-16 14:58:35 -06:00 committed by GitHub
commit 42ff0302a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -288,22 +288,22 @@ BlockTemplate.prototype.createCoinbase = function createCoinbase(hash) {
// Reserved size.
// Without segwit:
// CB weight = 504
// CB stripped size = 125
// CB size = 125
// CB stripped size = 126
// CB size = 126
// Sigops cost = 4
// With segwit:
// CB weight = 728
// CB stripped size = 172
// CB size = 208
// CB stripped size = 173
// CB size = 209
// Sigops cost = 4
if (!this.witness) {
assert.strictEqual(cb.getWeight() + padding * scale, 504);
assert.strictEqual(cb.getBaseSize() + padding, 125);
assert.strictEqual(cb.getSize() + padding, 125);
assert.strictEqual(cb.getBaseSize() + padding, 126);
assert.strictEqual(cb.getSize() + padding, 126);
} else {
assert.strictEqual(cb.getWeight() + padding * scale, 728);
assert.strictEqual(cb.getBaseSize() + padding, 172);
assert.strictEqual(cb.getSize() + padding, 208);
assert.strictEqual(cb.getBaseSize() + padding, 173);
assert.strictEqual(cb.getSize() + padding, 209);
}
// Setup coinbase flags (variable size).