MCPcopy Create free account
hub / github.com/CPChain/chain / Hash

Method Hash

types/transaction_signing.go:195–204  ·  view source on GitHub ↗

Hash returns the hash to be signed by the sender. It does not uniquely identify the transaction.

(tx *Transaction)

Source from the content-addressed store, hash-verified

193// Hash returns the hash to be signed by the sender.
194// It does not uniquely identify the transaction.
195func (fs FrontierSigner) Hash(tx *Transaction) common.Hash {
196 return rlpHash([]interface{}{
197 tx.data.AccountNonce,
198 tx.data.Price,
199 tx.data.GasLimit,
200 tx.data.Recipient,
201 tx.data.Amount,
202 tx.data.Payload,
203 })
204}
205
206func (fs FrontierSigner) Sender(tx *Transaction) (common.Address, error) {
207 return recoverPlain(fs.Hash(tx), tx.data.R, tx.data.S, tx.data.V, false)

Callers 1

SenderMethod · 0.95

Calls 1

rlpHashFunction · 0.70

Tested by

no test coverage detected