AthanorLabs / atomic-swap

💫 ETH-XMR atomic swap implementation
GNU Lesser General Public License v3.0
345 stars 44 forks source link

bootnode version fix #467

Closed dimalinux closed 1 year ago

dimalinux commented 1 year ago

daemon_version RPC requests on the bootnode where causing it to crash. It was accessing the protocolBackend interface, which is nil for bootnodes to get the chain-ID as well as the contract address. We also had Prometheus metrics that were added that were accessing protocolBackend.

Implemented solutions:

Closes #465 Closes #202

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 90.16% and project coverage change: +0.36 :tada:

Comparison is base (3859162) 57.57% compared to head (7490c90) 57.94%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #467 +/- ## ========================================== + Coverage 57.57% 57.94% +0.36% ========================================== Files 125 127 +2 Lines 12008 12185 +177 ========================================== + Hits 6914 7060 +146 - Misses 4361 4381 +20 - Partials 733 744 +11 ``` | [Impacted Files](https://app.codecov.io/gh/AthanorLabs/atomic-swap/pull/467?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | Coverage Δ | | |---|---|---| | [cmd/swapd/main.go](https://app.codecov.io/gh/AthanorLabs/atomic-swap/pull/467?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-Y21kL3N3YXBkL21haW4uZ28=) | `66.05% <ø> (-0.09%)` | :arrow_down: | | [common/config.go](https://app.codecov.io/gh/AthanorLabs/atomic-swap/pull/467?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-Y29tbW9uL2NvbmZpZy5nbw==) | `81.81% <68.42%> (-4.15%)` | :arrow_down: | | [bootnode/bootnode.go](https://app.codecov.io/gh/AthanorLabs/atomic-swap/pull/467?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-Ym9vdG5vZGUvYm9vdG5vZGUuZ28=) | `66.00% <100.00%> (ø)` | | | [cmd/bootnode/main.go](https://app.codecov.io/gh/AthanorLabs/atomic-swap/pull/467?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-Y21kL2Jvb3Rub2RlL21haW4uZ28=) | `66.66% <100.00%> (ø)` | | | [cmd/swapd/contract.go](https://app.codecov.io/gh/AthanorLabs/atomic-swap/pull/467?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-Y21kL3N3YXBkL2NvbnRyYWN0Lmdv) | `55.17% <100.00%> (-1.65%)` | :arrow_down: | | [daemon/swap\_daemon.go](https://app.codecov.io/gh/AthanorLabs/atomic-swap/pull/467?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-ZGFlbW9uL3N3YXBfZGFlbW9uLmdv) | `66.36% <100.00%> (+0.30%)` | :arrow_up: | | [rpc/daemon.go](https://app.codecov.io/gh/AthanorLabs/atomic-swap/pull/467?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-cnBjL2RhZW1vbi5nbw==) | `100.00% <100.00%> (ø)` | | | [rpc/server.go](https://app.codecov.io/gh/AthanorLabs/atomic-swap/pull/467?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-cnBjL3NlcnZlci5nbw==) | `75.96% <100.00%> (+1.58%)` | :arrow_up: | ... and [7 files with indirect coverage changes](https://app.codecov.io/gh/AthanorLabs/atomic-swap/pull/467/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.