[bisq-network/bisq] Add I2P as enum entry (PR #5840)

chimp1984 notifications at github.com
Thu Nov 18 18:03:52 CET 2021


After a seed node has updated Bitcoin Core to v22 he got the error posted below.
It seems I2P was added as enum value and our json parsing does not tolerate newly added values.
I think it would be good to add some error handling to not cause a fatal failure in such cases, but I am not familiar with that part of the code and with the used json library. This PR should at least fixe quickly the issue.

```
Nov-18 16:53:32.739 [RpcService] ERROR b.c.d.n.f.RpcService: com.fasterxml.jackson.databind.exc.InvalidFormatException: Cannot deserialize value of type `bisq.core.dao.node.full.rpc.dto.DtoNetworkInfo$NetworkType` from String "i2p": not one of the values accepted for Enum class: [onion, ipv4, ipv6] at [Source: UNKNOWN; line: -1, column: -1] (through reference chain: bisq.core.dao.node.full.rpc.dto.DtoNetworkInfo["networks"]->
java.util.ArrayList[3]->bisq.core.dao.node.full.rpc.dto.DtoNetworkInfo$Network["name"]) 
Nov-18 16:53:32.741 [SeedNodeMain] ERROR b.c.d.n.f.FullNode: An error occurred:Error=bisq.core.dao.node.full.RpcException: com.fasterxml.jackson.databind.exc.InvalidFormatException: Cannot deserialize value of type `bisq.core.dao.node.full.rpc.dto.DtoNetworkI
nfo$NetworkType` from String "i2p": not one of the values accepted for Enum class: [onion, ipv4, ipv6] at [Source: UNKNOWN; line: -1, column: -1] (through reference chain: bisq.core.dao.node.full.rpc.dto.DtoNetworkInfo["networks"]->
java.util.ArrayList[3]->bisq.core.dao.node.full.rpc.dto.DtoNetworkInfo$Network["name"]) 
Nov-18 16:53:32.742 [SeedNodeMain] ERROR b.c.a.m.AppSetupWithP2PAndDAO: An error occurred: Error=bisq.core.dao.node.full.RpcExcept
ion: com.fasterxml.jackson.databind.exc.InvalidFormatException: Cannot deserialize value of type `bisq.core.dao.node.full.rpc.dto.
DtoNetworkInfo$NetworkType` from String "i2p": not one of the values accepted for Enum class: [onion, ipv4, ipv6]
 at [Source: UNKNOWN; line: -1, column: -1] (through reference chain: bisq.core.dao.node.full.rpc.dto.DtoNetworkInfo["networks"]->
java.util.ArrayList[3]->bisq.core.dao.node.full.rpc.dto.DtoNetworkInfo$Network["name"]) 
```
You can view, comment on, or merge this pull request online at:

  https://github.com/bisq-network/bisq/pull/5840

-- Commit Summary --

  * Add I2P as enum entry

-- File Changes --

    M core/src/main/java/bisq/core/dao/node/full/rpc/dto/DtoNetworkInfo.java (2)

-- Patch Links --

https://github.com/bisq-network/bisq/pull/5840.patch
https://github.com/bisq-network/bisq/pull/5840.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/bisq-network/bisq/pull/5840
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20211118/492985db/attachment.htm>


More information about the bisq-github mailing list