Skip to content

Commit

Permalink
added a bit more function doc
Browse files Browse the repository at this point in the history
  • Loading branch information
ws4charlie committed Jul 28, 2023
1 parent 0c87494 commit 7cb8d62
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions zetaclient/bitcoin_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,11 @@ func (ob *BitcoinChainClient) observeOutTx() {
}
}

// Returns true if outTx passes basic checks
// Basic TSS outTX checks:
// - locate the raw tx and find the Vin
// - check if all inputs are segwit && TSS inputs
//
// Returns: true if outTx passes basic checks.
func (ob *BitcoinChainClient) checkTssOutTxResult(hash *chainhash.Hash, res *btcjson.GetTransactionResult) error {
if res.Confirmations == 0 {
rawtx, err := ob.rpcClient.GetRawTransactionVerbose(hash) // for pending tx, we query the raw tx
Expand Down Expand Up @@ -765,7 +769,7 @@ func (ob *BitcoinChainClient) checkTssOutTxResult(hash *chainhash.Hash, res *btc
return errors.Wrapf(err, "checkTssOutTxResult: invalid outTx with non-TSS vin %s", res.TxID)
}
}
return nil // ignore res.Confirmations < 0
return nil // ignore res.Confirmations < 0 (meaning not included)
}

// Returns true only if all inputs are TSS vins
Expand Down

0 comments on commit 7cb8d62

Please sign in to comment.