core/types: inline signtx

This commit is contained in:
Vie Yang 2024-03-04 21:26:21 +08:00
parent b893ee3fd6
commit bec34c5510
No known key found for this signature in database
GPG key ID: 0DE10FE8EFF200E2

View file

@ -107,8 +107,7 @@ func SignTx(tx *Transaction, s Signer, prv *ecdsa.PrivateKey) (*Transaction, err
// SignNewTx creates a transaction and signs it.
func SignNewTx(prv *ecdsa.PrivateKey, s Signer, txdata TxData) (*Transaction, error) {
tx := NewTx(txdata)
return SignTx(tx, s, prv)
return SignTx(NewTx(txdata), s, prv)
}
// MustSignNewTx creates a transaction and signs it.