mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-02-17 05:47:38 +00:00
transaction: fix ContentTypeNotSupported oracle code processing
Fix testnet block 311487 block processing and synchronization errors:
2021-09-14T15:18:53.611+0300 WARN peer disconnected {"addr": "20.198.226.132:20333", "reason": "invalid oracle response code", "peerCount": 10}
Fix 8e9302f40b
.
This commit is contained in:
parent
868835fb2a
commit
8a440a4016
1 changed files with 3 additions and 1 deletions
|
@ -48,7 +48,7 @@ var (
|
||||||
func (c OracleResponseCode) IsValid() bool {
|
func (c OracleResponseCode) IsValid() bool {
|
||||||
return c == Success || c == ProtocolNotSupported || c == ConsensusUnreachable || c == NotFound ||
|
return c == Success || c == ProtocolNotSupported || c == ConsensusUnreachable || c == NotFound ||
|
||||||
c == Timeout || c == Forbidden || c == ResponseTooLarge ||
|
c == Timeout || c == Forbidden || c == ResponseTooLarge ||
|
||||||
c == InsufficientFunds || c == Error
|
c == InsufficientFunds || c == ContentTypeNotSupported || c == Error
|
||||||
}
|
}
|
||||||
|
|
||||||
// MarshalJSON implements json.Marshaler interface.
|
// MarshalJSON implements json.Marshaler interface.
|
||||||
|
@ -80,6 +80,8 @@ func (c *OracleResponseCode) UnmarshalJSON(data []byte) error {
|
||||||
*c = ResponseTooLarge
|
*c = ResponseTooLarge
|
||||||
case "insufficientfunds":
|
case "insufficientfunds":
|
||||||
*c = InsufficientFunds
|
*c = InsufficientFunds
|
||||||
|
case "contenttypenotsupported":
|
||||||
|
*c = ContentTypeNotSupported
|
||||||
case "error":
|
case "error":
|
||||||
*c = Error
|
*c = Error
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Add table
Reference in a new issue