Skip to content
This repository has been archived by the owner on Jan 24, 2025. It is now read-only.

Commit

Permalink
Feat: fixed bug
Browse files Browse the repository at this point in the history
  • Loading branch information
hmoog committed Jan 19, 2024
1 parent dd6a662 commit 43719e7
Show file tree
Hide file tree
Showing 10 changed files with 160 additions and 152 deletions.
36 changes: 18 additions & 18 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,26 @@ require (
github.com/google/uuid v1.4.0
github.com/gorilla/websocket v1.5.1
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0
github.com/iotaledger/hive.go/ads v0.0.0-20231214025533-67add6c5091b
github.com/iotaledger/hive.go/app v0.0.0-20231219105941-542b1b724494
github.com/iotaledger/hive.go/constraints v0.0.0-20231219105941-542b1b724494
github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231219095137-dd4674b3226e
github.com/iotaledger/hive.go/crypto v0.0.0-20231219105941-542b1b724494
github.com/iotaledger/hive.go/ds v0.0.0-20231219105941-542b1b724494
github.com/iotaledger/hive.go/ierrors v0.0.0-20231219105941-542b1b724494
github.com/iotaledger/hive.go/kvstore v0.0.0-20231214025533-67add6c5091b
github.com/iotaledger/hive.go/lo v0.0.0-20231219105941-542b1b724494
github.com/iotaledger/hive.go/log v0.0.0-20231219105941-542b1b724494
github.com/iotaledger/hive.go/runtime v0.0.0-20231219105941-542b1b724494
github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231219095137-dd4674b3226e
github.com/iotaledger/hive.go/stringify v0.0.0-20231219105941-542b1b724494
github.com/iotaledger/hive.go/ads v0.0.0-20240117095736-623cd3fb800b
github.com/iotaledger/hive.go/app v0.0.0-20240117095736-623cd3fb800b
github.com/iotaledger/hive.go/constraints v0.0.0-20240117095736-623cd3fb800b
github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20240117095736-623cd3fb800b
github.com/iotaledger/hive.go/crypto v0.0.0-20240117095736-623cd3fb800b
github.com/iotaledger/hive.go/ds v0.0.0-20240117095736-623cd3fb800b
github.com/iotaledger/hive.go/ierrors v0.0.0-20240117095736-623cd3fb800b
github.com/iotaledger/hive.go/kvstore v0.0.0-20240117095736-623cd3fb800b
github.com/iotaledger/hive.go/lo v0.0.0-20240117095736-623cd3fb800b
github.com/iotaledger/hive.go/log v0.0.0-20240117095736-623cd3fb800b
github.com/iotaledger/hive.go/runtime v0.0.0-20240117095736-623cd3fb800b
github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20240117095736-623cd3fb800b
github.com/iotaledger/hive.go/stringify v0.0.0-20240117095736-623cd3fb800b
github.com/iotaledger/inx-app v1.0.0-rc.3.0.20240116140934-2ca7a381e6a4
github.com/iotaledger/inx/go v1.0.0-rc.2.0.20240116140821-25bc7acc397d
github.com/iotaledger/iota-crypto-demo v0.0.0-20231208171603-786bb32fdb00
github.com/iotaledger/iota.go/v4 v4.0.0-20240116140157-9e8010cb282d
github.com/labstack/echo/v4 v4.11.3
github.com/labstack/gommon v0.4.1
github.com/libp2p/go-libp2p v0.32.0
github.com/libp2p/go-libp2p v0.32.2
github.com/libp2p/go-libp2p-kad-dht v0.25.1
github.com/mr-tron/base58 v1.2.0
github.com/multiformats/go-multiaddr v0.12.0
Expand All @@ -43,7 +43,7 @@ require (
go.uber.org/dig v1.17.1
golang.org/x/crypto v0.17.0
google.golang.org/grpc v1.60.1
google.golang.org/protobuf v1.31.0
google.golang.org/protobuf v1.32.0
)

require (
Expand All @@ -61,7 +61,7 @@ require (
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/eclipse/paho.mqtt.golang v1.4.3 // indirect
github.com/elastic/gosigar v0.14.2 // indirect
github.com/ethereum/go-ethereum v1.13.6 // indirect
github.com/ethereum/go-ethereum v1.13.8 // indirect
github.com/fatih/structs v1.1.0 // indirect
github.com/felixge/fgprof v0.9.3 // indirect
github.com/fjl/memsize v0.0.2 // indirect
Expand All @@ -79,7 +79,7 @@ require (
github.com/google/go-github v17.0.0+incompatible // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/google/gopacket v1.1.19 // indirect
github.com/google/pprof v0.0.0-20231023181126-ff6d637d2a7b // indirect
github.com/google/pprof v0.0.0-20231212022811-ec68065c825e // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/go-version v1.6.0 // indirect
Expand All @@ -98,7 +98,7 @@ require (
github.com/jbenet/go-temp-err-catcher v0.1.0 // indirect
github.com/jbenet/goprocess v0.1.4 // indirect
github.com/klauspost/compress v1.17.2 // indirect
github.com/klauspost/cpuid/v2 v2.2.5 // indirect
github.com/klauspost/cpuid/v2 v2.2.6 // indirect
github.com/knadh/koanf v1.5.0 // indirect
github.com/koron/go-ssdp v0.0.4 // indirect
github.com/kr/text v0.2.0 // indirect
Expand Down
72 changes: 36 additions & 36 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.m
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/ethereum/go-ethereum v1.13.6 h1:TMlJ4t3TLVcnAMo2S8q+WocDLB6z496cYtkRyJJNNKQ=
github.com/ethereum/go-ethereum v1.13.6/go.mod h1:kcRZmuzRn1lVejiFNTz4l4W7imnpq1bDAnuKS/RyhbQ=
github.com/ethereum/go-ethereum v1.13.8 h1:1od+thJel3tM52ZUNQwvpYOeRHlbkVFZ5S8fhi0Lgsg=
github.com/ethereum/go-ethereum v1.13.8/go.mod h1:sc48XYQxCzH3fG9BcrXCOOgQk2JfZzNAmIKnceogzsA=
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU=
github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo=
Expand Down Expand Up @@ -204,8 +204,8 @@ github.com/google/gopacket v1.1.19/go.mod h1:iJ8V8n6KS+z2U1A8pUwu8bW5SyEMkXJB8Yo
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
github.com/google/pprof v0.0.0-20211214055906-6f57359322fd/go.mod h1:KgnwoLYCZ8IQu3XUZ8Nc/bM9CCZFOyjUNOSygVozoDg=
github.com/google/pprof v0.0.0-20231023181126-ff6d637d2a7b h1:RMpPgZTSApbPf7xaVel+QkoGPRLFLrwFO89uDUHEGf0=
github.com/google/pprof v0.0.0-20231023181126-ff6d637d2a7b/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik=
github.com/google/pprof v0.0.0-20231212022811-ec68065c825e h1:bwOy7hAFd0C91URzMIEBfr6BAz29yk7Qj0cy6S7DJlU=
github.com/google/pprof v0.0.0-20231212022811-ec68065c825e/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik=
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4=
Expand Down Expand Up @@ -277,32 +277,32 @@ github.com/iancoleman/orderedmap v0.3.0/go.mod h1:XuLcCUkdL5owUCQeF2Ue9uuw1EptkJ
github.com/ianlancetaylor/demangle v0.0.0-20210905161508-09a460cdf81d/go.mod h1:aYm2/VgdVmcIU8iMfdMvDMsRAQjcfZSKFby6HOFvi/w=
github.com/iotaledger/grocksdb v1.7.5-0.20230220105546-5162e18885c7 h1:dTrD7X2PTNgli6EbS4tV9qu3QAm/kBU3XaYZV2xdzys=
github.com/iotaledger/grocksdb v1.7.5-0.20230220105546-5162e18885c7/go.mod h1:ZRdPu684P0fQ1z8sXz4dj9H5LWHhz4a9oCtvjunkSrw=
github.com/iotaledger/hive.go/ads v0.0.0-20231214025533-67add6c5091b h1:sG5H0JmbjXPQ45eHTB27fQHViSu5sDRdSDQT54whalQ=
github.com/iotaledger/hive.go/ads v0.0.0-20231214025533-67add6c5091b/go.mod h1:XH4lnT4RPCTVt4b4DNL4FMoi20Ip3f4eFBkIx8WimXg=
github.com/iotaledger/hive.go/app v0.0.0-20231219105941-542b1b724494 h1:rO840L4zY8u6KaaDfj90gxfhgp1KxuSYeVd4yzTtTOQ=
github.com/iotaledger/hive.go/app v0.0.0-20231219105941-542b1b724494/go.mod h1:sQ+iVwZB/j8OxM1c81dsIcdzuFQMsXvrFK8dCfpQLCE=
github.com/iotaledger/hive.go/constraints v0.0.0-20231219105941-542b1b724494 h1:gt3LT6/ObMoS6X5KVugIwUTCSTWg7kyL2rAqmFdsIfM=
github.com/iotaledger/hive.go/constraints v0.0.0-20231219105941-542b1b724494/go.mod h1:dOBOM2s4se3HcWefPe8sQLUalGXJ8yVXw58oK8jke3s=
github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231219095137-dd4674b3226e h1:GQkpZq4zo24jzCUpE6N9ixB5/NxE6XjeQCdRktkRfOw=
github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231219095137-dd4674b3226e/go.mod h1:f+10zIZdQcEXGx9An2Y8YGfKwtdL3i0VlY9Ct+KbZEw=
github.com/iotaledger/hive.go/crypto v0.0.0-20231219105941-542b1b724494 h1:lsMO3ojhiSGb7jPUsrNPR/xtk2yL4tA2YHa3d4wZJ+I=
github.com/iotaledger/hive.go/crypto v0.0.0-20231219105941-542b1b724494/go.mod h1:YUdghEQkJkAO5GxEvpcKpSWtV5PxAIuW4hXIszROA2E=
github.com/iotaledger/hive.go/ds v0.0.0-20231219105941-542b1b724494 h1:3BnnbvvX6lrOp5fWpD3iXuk+s3nNXTTYPiadXYw+3fQ=
github.com/iotaledger/hive.go/ds v0.0.0-20231219105941-542b1b724494/go.mod h1:lDpFB4hkoUke5YxJ8ssmNNuY/qaxWaTQtVu/9y9BhKI=
github.com/iotaledger/hive.go/ierrors v0.0.0-20231219105941-542b1b724494 h1:LzsiaAUkXrlcyGPq+qsBdhbMMIZkM16hJoQgqkBr2r4=
github.com/iotaledger/hive.go/ierrors v0.0.0-20231219105941-542b1b724494/go.mod h1:HcE8B5lP96enc/OALTb2/rIIi+yOLouRoHOKRclKmC8=
github.com/iotaledger/hive.go/kvstore v0.0.0-20231214025533-67add6c5091b h1:tpZm/5y+zdOCkdTm4pcEC2cjd943EFKi+BSgNLBIA7A=
github.com/iotaledger/hive.go/kvstore v0.0.0-20231214025533-67add6c5091b/go.mod h1:UjkGs5jxiEwIFyzX4wfNk01dHuqDtTOtbzsSqoJR9Pw=
github.com/iotaledger/hive.go/lo v0.0.0-20231219105941-542b1b724494 h1:WzcyMcTExU4Xe4MGSu3WLjc1WVswUMmDiBY6m2Q+i3c=
github.com/iotaledger/hive.go/lo v0.0.0-20231219105941-542b1b724494/go.mod h1:kJ3T3R4oteGiO4KVlsHYoGWjl0StK2svlzqLjDPh7EQ=
github.com/iotaledger/hive.go/log v0.0.0-20231219105941-542b1b724494 h1:Is4KDfQ9qt8Ilq6RW1vOpbDTeGMHMPiSsyyBGkg7Ot4=
github.com/iotaledger/hive.go/log v0.0.0-20231219105941-542b1b724494/go.mod h1:JQ7L06XNadFPtxCTKWOtzTtWQEgDHIt5NXAnQoPdu30=
github.com/iotaledger/hive.go/runtime v0.0.0-20231219105941-542b1b724494 h1:f8Cp1XnbIcqWyyABd2nq4kkciui+CKaGSIJXLQSXi5s=
github.com/iotaledger/hive.go/runtime v0.0.0-20231219105941-542b1b724494/go.mod h1:kpzzMz84eIcjRPjJiDv04HBp+vGjW7udXyQ2t/ixjNM=
github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231219095137-dd4674b3226e h1:FOz9/O6yuNYFICP33gjHJ+0SBdzIm1oWfFhaEEiOq8Q=
github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231219095137-dd4674b3226e/go.mod h1:2Gl3qEk1CV9uFPF79JM0Fn4Da39P6SZO+uIF4YMy2kk=
github.com/iotaledger/hive.go/stringify v0.0.0-20231219105941-542b1b724494 h1:aa2z4tUca8aZNd2MLcLmGS19sP6BAAO9ULSOYJTFcxo=
github.com/iotaledger/hive.go/stringify v0.0.0-20231219105941-542b1b724494/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs=
github.com/iotaledger/hive.go/ads v0.0.0-20240117095736-623cd3fb800b h1:F1WQo3OKQ6uTce+MAyjMQfJtPgiFvPcM9sJb0qtrVW0=
github.com/iotaledger/hive.go/ads v0.0.0-20240117095736-623cd3fb800b/go.mod h1:+ysVYmX4esgKnGCeRo7Uhn7b6FrWrtJuZKvI0J4YXj4=
github.com/iotaledger/hive.go/app v0.0.0-20240117095736-623cd3fb800b h1:EcWMovs0wZ4b0TZkoYihRw5ZzssxdoGdWg5R3FnMSvU=
github.com/iotaledger/hive.go/app v0.0.0-20240117095736-623cd3fb800b/go.mod h1:EowdKxXnoe6QfJF315OssYyfX24LIcgAjTr78CqprMo=
github.com/iotaledger/hive.go/constraints v0.0.0-20240117095736-623cd3fb800b h1:20PMzZNuCmsQuxvSiMTMOGgqxuBoelmxDrcObN71k8I=
github.com/iotaledger/hive.go/constraints v0.0.0-20240117095736-623cd3fb800b/go.mod h1:dOBOM2s4se3HcWefPe8sQLUalGXJ8yVXw58oK8jke3s=
github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20240117095736-623cd3fb800b h1:0+d7iDuMtK0tj/zc8JvwRB8gnb8xQerfvg6Xy8wSNTI=
github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20240117095736-623cd3fb800b/go.mod h1:Xaj//ZaRtBsr4xGJMh9ZCLhC2QkOhiLNTDhPXVHbi7Q=
github.com/iotaledger/hive.go/crypto v0.0.0-20240117095736-623cd3fb800b h1:1cvLu1wTCkAYj6EaLFRKhXRu8yvnBwn+5iwBBS1aSu4=
github.com/iotaledger/hive.go/crypto v0.0.0-20240117095736-623cd3fb800b/go.mod h1:gsifUt12BCY+momgmC5QYhmG00ffuW0A5T5Sr72wyis=
github.com/iotaledger/hive.go/ds v0.0.0-20240117095736-623cd3fb800b h1:BnUhY6BjzhGCrG/teG7es7RSoscIuW0jaj17CwWi6Rk=
github.com/iotaledger/hive.go/ds v0.0.0-20240117095736-623cd3fb800b/go.mod h1:Ih+78nAgA5QALMvQk3a4SP94W/S/oNXHJTHmf4H9Rn4=
github.com/iotaledger/hive.go/ierrors v0.0.0-20240117095736-623cd3fb800b h1:yRClpQVTOc6eZFF9cFkEoEtqqB1CfCV1KR5k2RP5TfE=
github.com/iotaledger/hive.go/ierrors v0.0.0-20240117095736-623cd3fb800b/go.mod h1:HcE8B5lP96enc/OALTb2/rIIi+yOLouRoHOKRclKmC8=
github.com/iotaledger/hive.go/kvstore v0.0.0-20240117095736-623cd3fb800b h1:qR/vWnnW/FKsbB7AKlWPMu6H7sH4y/Xo1gZVLJOvb30=
github.com/iotaledger/hive.go/kvstore v0.0.0-20240117095736-623cd3fb800b/go.mod h1:ET5O4JuZjsDdyO5DeumF8VKwLascBNdAlmyeXHigD8c=
github.com/iotaledger/hive.go/lo v0.0.0-20240117095736-623cd3fb800b h1:ySqaMG4CO48tSWtPXNfxR+SJ2NOP0J/DyCXmnh0STQk=
github.com/iotaledger/hive.go/lo v0.0.0-20240117095736-623cd3fb800b/go.mod h1:w3abvs2FpXLd8rugaTq5YnT4KbniyulhePRU77F5pCg=
github.com/iotaledger/hive.go/log v0.0.0-20240117095736-623cd3fb800b h1:7XjeQJX9jqBGfIDD7ntNrD9xKwOHJgq1VwHsifBQiCc=
github.com/iotaledger/hive.go/log v0.0.0-20240117095736-623cd3fb800b/go.mod h1:9QT/3ZQB/sNlRgBxw07iJeD4a9e7GIRwNIdanIccx+Q=
github.com/iotaledger/hive.go/runtime v0.0.0-20240117095736-623cd3fb800b h1:D2YC8ciz2DyWHWZ7fKtOLhPsoQKoKJJHjigcA22GUZk=
github.com/iotaledger/hive.go/runtime v0.0.0-20240117095736-623cd3fb800b/go.mod h1:AzqO/YvIdFTZoK8r9UWHvxrqaWeWxDN+rFf+V7b/6gY=
github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20240117095736-623cd3fb800b h1:PY+nQ8treIKcgEfwtFYZAG2cRPpvJq3Mjj8xx2nNPoY=
github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20240117095736-623cd3fb800b/go.mod h1:LkvNBG7PeoQgCCSB/eMNX8kSHTXtRN10kFciLdMvcgc=
github.com/iotaledger/hive.go/stringify v0.0.0-20240117095736-623cd3fb800b h1:Fxet0IIzHuA8daQxBxHOXR1YGuCSbzeBVvqdiMsPWG0=
github.com/iotaledger/hive.go/stringify v0.0.0-20240117095736-623cd3fb800b/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs=
github.com/iotaledger/inx-app v1.0.0-rc.3.0.20240116140934-2ca7a381e6a4 h1:flpHyAqF66k+Savcgk6gNBVytX8ecjsiS+5wJ0jxr00=
github.com/iotaledger/inx-app v1.0.0-rc.3.0.20240116140934-2ca7a381e6a4/go.mod h1:ao7ikqgAuGrOXfe4a8D7G0wnNQ9OJeljKoaPMy9XDSM=
github.com/iotaledger/inx/go v1.0.0-rc.2.0.20240116140821-25bc7acc397d h1:uYdMmqvPdPbE67OKwlTyW4nCm2TD0uASt+j+vI8BzN0=
Expand Down Expand Up @@ -354,8 +354,8 @@ github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/klauspost/compress v1.17.2 h1:RlWWUY/Dr4fL8qk9YG7DTZ7PDgME2V4csBXA8L/ixi4=
github.com/klauspost/compress v1.17.2/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE=
github.com/klauspost/cpuid/v2 v2.2.5 h1:0E5MSMDEoAulmXNFquVs//DdoomxaoTY1kUhbc/qbZg=
github.com/klauspost/cpuid/v2 v2.2.5/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws=
github.com/klauspost/cpuid/v2 v2.2.6 h1:ndNyv040zDGIDh8thGkXYjnFtiN02M1PVVF+JE/48xc=
github.com/klauspost/cpuid/v2 v2.2.6/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws=
github.com/knadh/koanf v1.5.0 h1:q2TSd/3Pyc/5yP9ldIrSdIz26MCcyNQzW0pEAugLPNs=
github.com/knadh/koanf v1.5.0/go.mod h1:Hgyjp4y8v44hpZtPzs7JZfRAW5AhN7KfZcwv1RYggDs=
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
Expand Down Expand Up @@ -383,8 +383,8 @@ github.com/libp2p/go-cidranger v1.1.0 h1:ewPN8EZ0dd1LSnrtuwd4709PXVcITVeuwbag38y
github.com/libp2p/go-cidranger v1.1.0/go.mod h1:KWZTfSr+r9qEo9OkI9/SIEeAtw+NNoU0dXIXt15Okic=
github.com/libp2p/go-flow-metrics v0.1.0 h1:0iPhMI8PskQwzh57jB9WxIuIOQ0r+15PChFGkx3Q3WM=
github.com/libp2p/go-flow-metrics v0.1.0/go.mod h1:4Xi8MX8wj5aWNDAZttg6UPmc0ZrnFNsMtpsYUClFtro=
github.com/libp2p/go-libp2p v0.32.0 h1:86I4B7nBUPIyTgw3+5Ibq6K7DdKRCuZw8URCfPc1hQM=
github.com/libp2p/go-libp2p v0.32.0/go.mod h1:hXXC3kXPlBZ1eu8Q2hptGrMB4mZ3048JUoS4EKaHW5c=
github.com/libp2p/go-libp2p v0.32.2 h1:s8GYN4YJzgUoyeYNPdW7JZeZ5Ee31iNaIBfGYMAY4FQ=
github.com/libp2p/go-libp2p v0.32.2/go.mod h1:E0LKe+diV/ZVJVnOJby8VC5xzHF0660osg71skcxJvk=
github.com/libp2p/go-libp2p-asn-util v0.3.0 h1:gMDcMyYiZKkocGXDQ5nsUQyquC9+H+iLEQHwOCZ7s8s=
github.com/libp2p/go-libp2p-asn-util v0.3.0/go.mod h1:B1mcOrKUE35Xq/ASTmQ4tN3LNzVVaMNmq2NACuqyB9w=
github.com/libp2p/go-libp2p-kad-dht v0.25.1 h1:ofFNrf6MMEy4vi3R1VbJ7LOcTn3Csh0cDcaWHTxtWNA=
Expand Down Expand Up @@ -902,8 +902,8 @@ google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpAD
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8=
google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I=
google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d/go.mod h1:cuepJuh7vyXfUyUwEgHQXw849cJrilpS5NeIjOWESAw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
Expand Down
8 changes: 6 additions & 2 deletions pkg/protocol/chains.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,15 @@ func (c *Chains) initChainSwitching() (shutdown func()) {
}),

c.HeaviestAttestedCandidate.OnUpdate(func(_ *Chain, heaviestAttestedCandidate *Chain) {
heaviestAttestedCandidate.StartEngine.Set(true)
if heaviestAttestedCandidate != nil {
heaviestAttestedCandidate.StartEngine.Set(true)
}
}),

c.HeaviestVerifiedCandidate.OnUpdate(func(_ *Chain, heaviestVerifiedCandidate *Chain) {
c.Main.Set(heaviestVerifiedCandidate)
if heaviestVerifiedCandidate != nil {
c.Main.Set(heaviestVerifiedCandidate)
}
}),

c.WithElements(c.trackHeaviestCandidates),
Expand Down
4 changes: 4 additions & 0 deletions pkg/protocol/commitment.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,10 @@ func (c *Commitment) TargetEngine() *engine.Engine {
return nil
}

func (c *Commitment) Less(other *Commitment) bool {
return other.Chain.Get().winsTieBreak(c.Chain.Get())
}

// initLogger initializes the Logger of this Commitment.
func (c *Commitment) initLogger() (shutdown func()) {
c.Logger = c.commitments.NewChildLogger(fmt.Sprintf("Slot%d.", c.Slot()), true)
Expand Down
1 change: 1 addition & 0 deletions pkg/protocol/heaviest_chain_candidate.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ func (h *HeaviestChainCandidate) measureAt(slot iotago.SlotIndex) (teardown func
}

teardownFunctions = append(teardownFunctions, slotsWithSameChain.OnUpdate(func(_ int, slotsWithSameChain int) {

if slotsWithSameChain >= int(chainSwitchingThreshold)-1 {
h.Set(heaviestChain)
} else {
Expand Down
2 changes: 1 addition & 1 deletion pkg/protocol/warp_sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ func (w *WarpSync) ProcessResponse(commitmentID iotago.CommitmentID, blockIDsByS
commitment.IsSynced.OnUpdateOnce(func(_ bool, _ bool) {
// update the flag in a worker since it can potentially cause a commit
w.workerPool.Submit(func() {
if committableCommitment, exists := chain.Commitment(commitmentID.Slot() - targetEngine.LatestAPI().ProtocolParameters().MinCommittableAge() + 1); exists {
if committableCommitment, exists := chain.Commitment(commitmentID.Slot() - targetEngine.LatestAPI().ProtocolParameters().MinCommittableAge()); exists {
committableCommitment.IsCommittable.Set(true)
}
})
Expand Down
Loading

0 comments on commit 43719e7

Please sign in to comment.