lnwallet: add PublishTransaction error types
This commit is contained in:
parent
7abdd30a87
commit
a1a9834a53
@ -35,6 +35,11 @@ const (
|
|||||||
PubKeyHash
|
PubKeyHash
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// ErrDoubleSpend is returned from PublishTransaction in case the
|
||||||
|
// tx being published is spending an output spent by a conflicting
|
||||||
|
// transaction.
|
||||||
|
var ErrDoubleSpend = errors.New("Transaction rejected: output already spent")
|
||||||
|
|
||||||
// Utxo is an unspent output denoted by its outpoint, and output value of the
|
// Utxo is an unspent output denoted by its outpoint, and output value of the
|
||||||
// original output.
|
// original output.
|
||||||
type Utxo struct {
|
type Utxo struct {
|
||||||
@ -183,6 +188,11 @@ type WalletController interface {
|
|||||||
|
|
||||||
// PublishTransaction performs cursory validation (dust checks, etc),
|
// PublishTransaction performs cursory validation (dust checks, etc),
|
||||||
// then finally broadcasts the passed transaction to the Bitcoin network.
|
// then finally broadcasts the passed transaction to the Bitcoin network.
|
||||||
|
// If the transaction is rejected because it is conflicting with an
|
||||||
|
// already known transaction, ErrDoubleSpend is returned. If the
|
||||||
|
// transaction is already known (published already), no error will be
|
||||||
|
// returned. Other error returned depends on the currently active chain
|
||||||
|
// backend.
|
||||||
PublishTransaction(tx *wire.MsgTx) error
|
PublishTransaction(tx *wire.MsgTx) error
|
||||||
|
|
||||||
// SubscribeTransactions returns a TransactionSubscription client which
|
// SubscribeTransactions returns a TransactionSubscription client which
|
||||||
|
Loading…
Reference in New Issue
Block a user