Length checking when fetching contract. Contract always have 3 fields

pull/150/head
obscuren 11 years ago
parent 4f4175a3e2
commit 507fc7b9d1
  1. 5
      ethchain/block.go

@ -131,6 +131,11 @@ func (block *Block) GetContract(addr []byte) *Contract {
return nil
}
value := ethutil.NewValueFromBytes([]byte(data))
if value.Len() == 2 {
return nil
}
contract := &Contract{}
contract.RlpDecode([]byte(data))

Loading…
Cancel
Save