Merge pull request #2 from bitspill/patch-1

Include FloData in weight
This commit is contained in:
Sky Young 2018-10-16 14:51:37 -06:00 committed by GitHub
commit 3f7ea8ebcd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);
}