Skip to content

Conversation

@GeorgeTsagk
Copy link
Member

Closes #654

@GeorgeTsagk GeorgeTsagk self-assigned this Nov 8, 2023

if a.ChainAnchor.AnchorTxid != txid.String() {
anchorTxid :=
strings.Split(a.ChainAnchor.AnchorOutpoint, ":")[0]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the txid info was duplicate I now retrieve it by splitting the outpoint string

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you should use wire.NewOutPointFromString here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call, is the hash reversed in the raw outpoint string?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the outpoint string consists of the txid and the vout index. The txid in the outpoint string is a hex encoding of the byte reversed hash.

@GeorgeTsagk
Copy link
Member Author

There was a flake on a batch mint assets test, kicked it and passed, just flagging


if a.ChainAnchor.AnchorTxid != txid.String() {
anchorTxid :=
strings.Split(a.ChainAnchor.AnchorOutpoint, ":")[0]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you should use wire.NewOutPointFromString here.

@GeorgeTsagk GeorgeTsagk force-pushed the rpc-remove-anchor-txid branch from b45fa51 to 8f7b0c1 Compare November 8, 2023 20:03
@GeorgeTsagk GeorgeTsagk requested a review from ffranr November 8, 2023 20:56
Copy link
Contributor

@ffranr ffranr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Just two or so nits.

I'm a fan of this change because it reduces our test surface.

@GeorgeTsagk GeorgeTsagk force-pushed the rpc-remove-anchor-txid branch from 8f7b0c1 to da6dcea Compare November 8, 2023 22:11
Copy link
Contributor

@ffranr ffranr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! 💯

Copy link
Contributor

@jharveyb jharveyb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍🏽

@GeorgeTsagk GeorgeTsagk added this pull request to the merge queue Nov 9, 2023
Merged via the queue into lightninglabs:main with commit cdd6707 Nov 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

Remove field anchor_txid from RPC message AnchorInfo.

3 participants