Merge pull request #522 from nspcc-dev/fix-invalid-tx-type-handling
Fix invalid tx type handling
This commit is contained in:
commit
1a9e98caf3
1 changed files with 3 additions and 2 deletions
|
@ -1,10 +1,11 @@
|
||||||
package transaction
|
package transaction
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
|
|
||||||
"github.com/CityOfZion/neo-go/pkg/crypto/hash"
|
"github.com/CityOfZion/neo-go/pkg/crypto/hash"
|
||||||
"github.com/CityOfZion/neo-go/pkg/io"
|
"github.com/CityOfZion/neo-go/pkg/io"
|
||||||
"github.com/CityOfZion/neo-go/pkg/util"
|
"github.com/CityOfZion/neo-go/pkg/util"
|
||||||
log "github.com/sirupsen/logrus"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -137,7 +138,7 @@ func (t *Transaction) decodeData(r *io.BinReader) {
|
||||||
t.Data = &StateTX{}
|
t.Data = &StateTX{}
|
||||||
t.Data.(*StateTX).DecodeBinary(r)
|
t.Data.(*StateTX).DecodeBinary(r)
|
||||||
default:
|
default:
|
||||||
log.Warnf("invalid TX type %s", t.Type)
|
r.Err = fmt.Errorf("invalid TX type %x", t.Type)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue