diff --git a/ethchain/transaction.go b/ethchain/transaction.go index da3f9bcf229b698d97e8bb1e3ea34a654db61f01..0b4f8d1a4235f5a93353d99851a1825d8e1e2c4a 100644 --- a/ethchain/transaction.go +++ b/ethchain/transaction.go @@ -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