Skip to content

Commit

Permalink
Implement Sortable interface for EVM input/output
Browse files Browse the repository at this point in the history
  • Loading branch information
zeekay committed Dec 12, 2023
1 parent c63eb19 commit 5f059a6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions plugin/evm/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ func (o EVMOutput) Compare(other EVMOutput) int {

// Less returns an integer comparing two EVMOutput values.
// The result will be 0 if o==other, -1 if o < other, and +1 if o > other.
func (o EVMOutput) Less(other EVMOutput) int {
return o.Compare(other)
func (o EVMOutput) Less(other EVMOutput) bool {
return o.Compare(other) < 0
}

// EVMInput defines an input created from the EVM state to fund export transactions
Expand All @@ -87,8 +87,8 @@ func (i EVMInput) Compare(other EVMInput) int {

// Less returns an integer comparing two EVMInput values.
// The result will be 0 if i==other, -1 if i < other, and +1 if i > other.
func (i EVMInput) Less(other EVMInput) int {
return i.Compare(other)
func (i EVMInput) Less(other EVMInput) bool {
return i.Compare(other) < 0
}

// Verify ...
Expand Down

0 comments on commit 5f059a6

Please sign in to comment.