Merge remote-tracking branch 'origin/develop' into dev/multisig

This commit is contained in:
ValarDragon
2018-08-09 01:05:39 -05:00
31 changed files with 393 additions and 2573 deletions

View File

@@ -37,6 +37,8 @@ func (bA *CompactBitArray) Size() int {
} else if bA.ExtraBitsStored == byte(0) {
return len(bA.Elems) * 8
}
// num_bits = 8*num_full_bytes + overflow_in_last_byte
// num_full_bytes = (len(bA.Elems)-1)
return (len(bA.Elems)-1)*8 + int(bA.ExtraBitsStored)
}