Fixed mining & limited hash power

This commit is contained in:
obscuren
2015-02-14 16:52:14 +01:00
parent 65159d65c8
commit 32c7ebc51d
5 changed files with 44 additions and 22 deletions

View File

@ -209,6 +209,7 @@ func (self *Block) ParentHash() []byte {
func (self *Block) String() string {
return fmt.Sprintf(`BLOCK(%x): Size: %v TD: %v {
NoNonce: %x
Header:
[
%v
@ -218,7 +219,7 @@ Transactions:
Uncles:
%v
}
`, self.header.Hash(), self.Size(), self.Td, self.header, self.transactions, self.uncles)
`, self.header.Hash(), self.Size(), self.Td, self.header.HashNoNonce(), self.header, self.transactions, self.uncles)
}
func (self *Header) String() string {

View File

@ -17,7 +17,7 @@ type Receipt struct {
}
func NewReceipt(root []byte, cumalativeGasUsed *big.Int) *Receipt {
return &Receipt{PostState: ethutil.CopyBytes(root), CumulativeGasUsed: cumalativeGasUsed}
return &Receipt{PostState: ethutil.CopyBytes(root), CumulativeGasUsed: new(big.Int).Set(cumalativeGasUsed)}
}
func NewRecieptFromValue(val *ethutil.Value) *Receipt {