check TxMsg

- add validation on TxMsg checking for nil
- add test for nil transaction
- add test for zero value transaction (no extra validation needed)
This commit is contained in:
zelig
2015-03-30 15:21:41 +01:00
parent 82da6bf4d2
commit 6ffea34d8b
3 changed files with 46 additions and 4 deletions

View File

@ -250,10 +250,10 @@ func (self *Block) AddReceipt(receipt *Receipt) {
}
func (self *Block) RlpData() interface{} {
// return []interface{}{self.header, self.transactions, self.uncles}
// }
return []interface{}{self.header, self.transactions, self.uncles}
}
// func (self *Block) RlpDataForStorage() interface{} {
func (self *Block) RlpDataForStorage() interface{} {
return []interface{}{self.header, self.transactions, self.uncles, self.Td /* TODO receipts */}
}