Changed the way transactions are being added to the transaction pool

This commit is contained in:
obscuren
2014-12-01 20:18:09 +01:00
parent a3559c5e1b
commit 6dc46d3341
15 changed files with 239 additions and 98 deletions

View File

@ -62,6 +62,16 @@ func S256(x *big.Int) *big.Int {
}
}
func FirstBitSet(v *big.Int) *big.Int {
for i := 0; i < v.BitLen(); i++ {
if v.Bit(i) > 0 {
return big.NewInt(int64(i))
}
}
return big.NewInt(int64(v.BitLen()))
}
// Big to bytes
//
// Returns the bytes of a big integer with the size specified by **base**