core/types: add Transaction.Size
This commit is contained in:
parent
fda49f2b52
commit
7aefe123e9
@ -67,6 +67,13 @@ func (tx *Transaction) Hash() common.Hash {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Size returns the encoded RLP size of tx.
|
||||||
|
func (self *Transaction) Size() common.StorageSize {
|
||||||
|
c := writeCounter(0)
|
||||||
|
rlp.Encode(&c, self)
|
||||||
|
return common.StorageSize(c)
|
||||||
|
}
|
||||||
|
|
||||||
func (self *Transaction) Data() []byte {
|
func (self *Transaction) Data() []byte {
|
||||||
return self.Payload
|
return self.Payload
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user