From 7cb8d621aec1a64f4e8412c7436ef8312eff4f0a Mon Sep 17 00:00:00 2001 From: charliec Date: Fri, 28 Jul 2023 12:28:59 -0500 Subject: [PATCH] added a bit more function doc --- zetaclient/bitcoin_client.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/zetaclient/bitcoin_client.go b/zetaclient/bitcoin_client.go index 5658dcf177..ed0dd4d97f 100644 --- a/zetaclient/bitcoin_client.go +++ b/zetaclient/bitcoin_client.go @@ -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 @@ -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