-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: (BitcoinRBF-Step2): some minimum code refactoring for Bitco…
…in RBF adoption (#3381) * minimum code refactor for bitcoin RBF * add changelog entry * add unit test for FeeRateToSatPerByte * make changelog descriptive; rename specialHandleFeeRate as GetFeeRateForRegnetAndTestnet; code simplification * renaming sample function; make switch case in PostGasPrice to estimate fee rate according to Bitcoin network type * remove redundant variable description * make AddWithdrawTxOutputs a one-line call * rename sample function BTCAddressP2WPKH * remove unused test and comment * include coin type to error message; make code cleaner * return error if failed to get signer address; add BTCPayToAddrScript as a method of TSS PubKey * Update zetaclient/chains/bitcoin/signer/signer.go Replace 'Msgf' with 'Msg' Co-authored-by: Dmitry S <[email protected]> * remove redundant test functions; use testlog for unit test * create observer in test suite; use testlog package * add description to fee estimation formula * use structured logs * make AddTxInputs independent method * add comments to explain function arguments; improve error wrapping; code simplification * replace ifs with switch case; return original err without overwriting * seems safe to remove panic recovery in FetchUTXOs * move Telemetry update to the line before acquiring observer lock * use testlog package * use retry package for Bitcoin tx broadcasting; let SaveBroadcastedTx return error * use named return values to make GetEstimatedFeeRate more readable * move utxo unit tests to utxos.go and improved unit tests * wrap RPC error in LoadLastBlockScanned * move last scanned block to log field; use Opt function for test suite * move values to log fields * add unit test for FetchUTXOs * add unit for SignWithdrawTx; use structured log * avoid creating log field map and add log fields right on the logger * fix client.GetEstimatedFeeRate * Fix loadBroadcastedTxMap * Fix SelectedUTXOs * Fix log naming * fix e2e logging * Fix setPendingNonce * don't use GasPriorityFee as it's always empty * update changelog --------- Co-authored-by: Dmitry S <[email protected]>
- Loading branch information
1 parent
9106fe6
commit abf5af8
Showing
41 changed files
with
2,719 additions
and
1,397 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.