aboutsummaryrefslogtreecommitdiffstats
path: root/ethchain
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-07-15 04:52:44 +0800
committerobscuren <geffobscura@gmail.com>2014-07-15 04:52:44 +0800
commit98f21d8973398ccf58a762788a1972ef16213de5 (patch)
treef851ebbeeb531436304d98c9fed34ca67546f342 /ethchain
parent767d24ea5da8794dbc3b8bed19f6c204e775e406 (diff)
downloadgo-tangerine-98f21d8973398ccf58a762788a1972ef16213de5.tar.gz
go-tangerine-98f21d8973398ccf58a762788a1972ef16213de5.tar.zst
go-tangerine-98f21d8973398ccf58a762788a1972ef16213de5.zip
Compare method for receipts
Diffstat (limited to 'ethchain')
-rw-r--r--ethchain/transaction.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/ethchain/transaction.go b/ethchain/transaction.go
index da3f9bcf2..0b4f8d1a4 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