Skip to content

Commit

Permalink
完善TxData
Browse files Browse the repository at this point in the history
  • Loading branch information
chai2010 committed Dec 3, 2019
1 parent 0b078a9 commit 5dad69b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tx.go
Expand Up @@ -33,6 +33,13 @@ type TxData struct {
S *big.Int
}

// RLP编码签名过后的交易
func (p *TxData) EncodeRLP() []byte {
var buf bytes.Buffer
rlp.Encode(&buf, p)
return buf.Bytes()
}

// 生成最新规范的要签名编码数据
func (p *TxData) SigData() []byte {
// 输出EIP55之后的格式, 不包含 chainId
Expand Down

0 comments on commit 5dad69b

Please sign in to comment.