taproot-assets
taproot-assets copied to clipboard
rfq+rfqmsg: add structured price oracle error codes
Adds some structure to price oracle error codes, along with some custom handling for them. In particular, a code of '1' now corresponds to an 'unsupported asset' error, which, considered a 'public' error, is forwarded in the customizable message field of the reject messages sent to peers. An error with any other code continues, at present, to be treated as an unspecified error.
Resolves #1749, #1326.
(This is a refinement over the closed #1751, which forwarded errors indiscriminately.)
Pull Request Test Coverage Report for Build 17268575857
Details
- 1 of 99 (1.01%) changed or added relevant lines in 4 files are covered.
- 84 unchanged lines in 16 files lost coverage.
- Overall coverage decreased (-0.06%) to 56.558%
| Changes Missing Coverage | Covered Lines | Changed/Added Lines | % |
|---|---|---|---|
| rfqmsg/reject.go | 0 | 6 | 0.0% |
| rfq/oracle.go | 0 | 12 | 0.0% |
| taprpc/priceoraclerpc/price_oracle.pb.go | 1 | 23 | 4.35% |
| rfq/negotiator.go | 0 | 58 | 0.0% |
| <!-- | Total: | 1 | 99 |
| Files with Coverage Reduction | New Missed Lines | % |
|---|---|---|
| address/mock.go | 2 | 96.2% |
| asset/group_key.go | 2 | 72.15% |
| mssmt/compacted_tree.go | 2 | 79.49% |
| tapdb/assets_common.go | 2 | 78.72% |
| tapdb/sqlc/transfers.sql.go | 2 | 82.65% |
| tapdb/sqlc/universe.sql.go | 2 | 75.78% |
| tapchannel/aux_leaf_signer.go | 3 | 43.43% |
| rfqmsg/records.go | 4 | 70.8% |
| rpcserver.go | 4 | 61.03% |
| tapdb/universe.go | 4 | 81.64% |
| <!-- | Total: | 84 |
| Totals | |
|---|---|
| Change from base Build 17140538774: | -0.06% |
| Covered Lines: | 60774 |
| Relevant Lines: | 107454 |
💛 - Coveralls
@georgetsagk: review reminder @ffranr: review reminder