Length checking when fetching contract. Contract always have 3 fields
This commit is contained in:
parent
4f4175a3e2
commit
507fc7b9d1
|
@ -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…
Reference in New Issue