HomePhabricator

[Cashtab] [chronik utxo handling p9] Update sendXec functions for new utxo…

Description

[Cashtab] [chronik utxo handling p9] Update sendXec functions for new utxo storage format

Summary:
T2447

Depends on D11967

Update sendXec function and the functions it relies on to generate and send an XEC transaction with the new chronik utxo storage format.

Key differences: chronik utxos have an outpoint key with the vout at outIdx. The txid is also included in this outpoint object.

Also, while chronik utxos still have a value key, it is string type. Transaction builder utxo signing requires this to be a number.

This diff also modifies mocks used by unit tests to have the new chronik format.

Test Plan:
npm start

  1. Send a one-to-one XEC tx and review in block explorer for correct fee, change, weirdness check
  2. Do the same for a one-to-many XEC tx
  3. Do the same for a one-to-one and one-to-many XEC tx with OP_RETURN msg
  4. Do the same for one-to-one XEC tx with encrypted msg

Note: token txs are still broken in this iteration and will be fixed in a subsequent diff on this stack

Reviewers: #bitcoin_abc, emack

Reviewed By: #bitcoin_abc, emack

Differential Revision: https://reviews.bitcoinabc.org/D11977

Details

Provenance
bytesofmanAuthored on Sep 13 2022, 17:36
bytesofmanPushed on Sep 20 2022, 15:27
Reviewer
Restricted Project
Differential Revision
D11977: [Cashtab] [chronik utxo handling p9] Update sendXec functions for new utxo storage format
Parents
rABCa528c5156fa3: [Cashtab] [chronik utxo handling p8] Remove obsolete bch-api functions, unit…
Branches
Unknown
Tags
Unknown