mirror of
https://gitlab.com/pulsechaincom/go-pulse.git
synced 2024-12-25 12:57:17 +00:00
Compare method for receipts
This commit is contained in:
parent
767d24ea5d
commit
98f21d8973
@ -227,6 +227,18 @@ func (self *Receipt) String() string {
|
||||
self.CumulativeGasUsed)
|
||||
}
|
||||
|
||||
func (self *Receipt) Cmp(other *Receipt) bool {
|
||||
if bytes.Compare(self.PostState, other.PostState) != 0 {
|
||||
return false
|
||||
}
|
||||
|
||||
if self.CumulativeGasUsed.Cmp(other.CumulativeGasUsed) != 0 {
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
// Transaction slice type for basic sorting
|
||||
type Transactions []*Transaction
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user