Skip to content

Commit

Permalink
Updated global_sequence and recv_sequence (and friends) to Uint64, …
Browse files Browse the repository at this point in the history
…which

they are per `nodeos`'s code.
  • Loading branch information
abourget committed Jan 22, 2019
1 parent 52f6be8 commit 5890e34
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions responses.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,11 @@ type ActionTrace struct {
Receipt struct {
Receiver AccountName `json:"receiver"`
ActionDigest string `json:"act_digest"`
GlobalSequence Int64 `json:"global_sequence"`
ReceiveSequence Int64 `json:"recv_sequence"`
GlobalSequence Uint64 `json:"global_sequence"`
ReceiveSequence Uint64 `json:"recv_sequence"`
AuthSequence []TransactionTraceAuthSequence `json:"auth_sequence"` // [["account", sequence], ["account", sequence]]
CodeSequence Int64 `json:"code_sequence"`
ABISequence Int64 `json:"abi_sequence"`
CodeSequence Uint64 `json:"code_sequence"`
ABISequence Uint64 `json:"abi_sequence"`
} `json:"receipt"`
Action *Action `json:"act"`
Elapsed int `json:"elapsed"`
Expand All @@ -113,7 +113,7 @@ type ActionTrace struct {

type TransactionTraceAuthSequence struct {
Account AccountName
Sequence Int64
Sequence Uint64
}

// [ ["account", 123123], ["account2", 345] ]
Expand All @@ -137,7 +137,7 @@ func (auth *TransactionTraceAuthSequence) UnmarshalJSON(data []byte) error {
return fmt.Errorf("expected 2nd item to be a sequence number (float64)")
}

*auth = TransactionTraceAuthSequence{AccountName(account), Int64(seq)}
*auth = TransactionTraceAuthSequence{AccountName(account), Uint64(seq)}

return nil
}
Expand Down

1 comment on commit 5890e34

@RickyShiJs
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just found the type of global_sequence in trx is String now. It should doesn't work now.

Please sign in to comment.