Removed RlpValue in favour of Value

This commit is contained in:
obscuren
2014-02-15 01:34:18 +01:00
parent f247f0c518
commit 73fd358d94
8 changed files with 29 additions and 271 deletions

View File

@ -102,7 +102,7 @@ func CreateBlock(root interface{},
// Returns a hash of the block
func (block *Block) Hash() []byte {
return ethutil.Sha3Bin(block.RlpValue().Encode())
return ethutil.Sha3Bin(block.Value().Encode())
}
func (block *Block) HashNoNonce() []byte {
@ -261,14 +261,14 @@ func (block *Block) SetTransactions(txs []*Transaction) {
block.TxSha = ethutil.Sha3Bin(ethutil.Encode(block.rlpTxs()))
}
func (block *Block) RlpValue() *ethutil.RlpValue {
return ethutil.NewRlpValue([]interface{}{block.header(), block.rlpTxs(), block.rlpUncles()})
func (block *Block) Value() *ethutil.Value {
return ethutil.NewValue([]interface{}{block.header(), block.rlpTxs(), block.rlpUncles()})
}
func (block *Block) RlpEncode() []byte {
// Encode a slice interface which contains the header and the list of
// transactions.
return block.RlpValue().Encode()
return block.Value().Encode()
}
func (block *Block) RlpDecode(data []byte) {