forked from TrueCloudLab/neoneo-go
transaction: add missing alloc in state decoder
Fixes panic two lines below: panic: runtime error: index out of range [recovered] panic: runtime error: index out of range
This commit is contained in:
parent
203aab6a7e
commit
b8adc36e6a
1 changed files with 1 additions and 0 deletions
|
@ -18,6 +18,7 @@ func (tx *StateTX) DecodeBinary(r io.Reader) error {
|
|||
if br.Err != nil {
|
||||
return br.Err
|
||||
}
|
||||
tx.Descriptors = make([]*StateDescriptor, lenDesc)
|
||||
for i := 0; i < int(lenDesc); i++ {
|
||||
tx.Descriptors[i] = &StateDescriptor{}
|
||||
if err := tx.Descriptors[i].DecodeBinary(r); err != nil {
|
||||
|
|
Loading…
Reference in a new issue