Skip to content

Commit

Permalink
Merge branch 'main' of github.com:kaleido-io/firefly-evmconnect into …
Browse files Browse the repository at this point in the history
…fix-long-poll
  • Loading branch information
Chengxuan committed Sep 5, 2024
2 parents 7f002f4 + 81ea8f3 commit 57f1df0
Show file tree
Hide file tree
Showing 8 changed files with 637 additions and 17 deletions.
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ toolchain go1.21.6

require (
github.com/hashicorp/golang-lru v1.0.2
github.com/hyperledger/firefly-common v1.4.8
github.com/hyperledger/firefly-signer v1.1.13
github.com/hyperledger/firefly-transaction-manager v1.3.15
github.com/hyperledger/firefly-common v1.4.9
github.com/hyperledger/firefly-signer v1.1.14
github.com/hyperledger/firefly-transaction-manager v1.3.16
github.com/sirupsen/logrus v1.9.3
github.com/spf13/cobra v1.8.0
github.com/stretchr/testify v1.8.4
Expand Down
12 changes: 6 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,12 @@ github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpO
github.com/huandu/xstrings v1.3.3/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE=
github.com/huandu/xstrings v1.4.0 h1:D17IlohoQq4UcpqD7fDk80P7l+lwAmlFaBHgOipl2FU=
github.com/huandu/xstrings v1.4.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE=
github.com/hyperledger/firefly-common v1.4.8 h1:0o1Qp1c5YzQo8nbnX+gAo9SVd2tR4Z9U2t8Y4zEzyaA=
github.com/hyperledger/firefly-common v1.4.8/go.mod h1:dXewcVMFNON2SvQ1UPvu64OWUt77+M3p8qy61lT1kE4=
github.com/hyperledger/firefly-signer v1.1.13 h1:eiHjc6HPRG8AzXUCUgm51qqX1I9BokiuiiqJ89XwK4M=
github.com/hyperledger/firefly-signer v1.1.13/go.mod h1:pK6kivzBFSue3zpJSQpH67VasnLLbwBJOBUNv0zHbRA=
github.com/hyperledger/firefly-transaction-manager v1.3.15 h1:IyWIId+uytqjIRMxROk5OqOcdHMzJFGFKpQQybiISOU=
github.com/hyperledger/firefly-transaction-manager v1.3.15/go.mod h1:N3BoHh8+dWG710oQKuNiXmJNEOBBeLTsQ8GpZ41vhog=
github.com/hyperledger/firefly-common v1.4.9 h1:PfPZ73FN8WUoPl8iF8ud00B8476+jmqXHHi94w0Krbc=
github.com/hyperledger/firefly-common v1.4.9/go.mod h1:dXewcVMFNON2SvQ1UPvu64OWUt77+M3p8qy61lT1kE4=
github.com/hyperledger/firefly-signer v1.1.14 h1:gSGwdBHTLPchGlmLOKk2Y2nawfMhlH2CDm2owt0lIUE=
github.com/hyperledger/firefly-signer v1.1.14/go.mod h1:Xj2PF6y8Ce26jX38ch0KasNnnZCSyzcwyLSv8NN+7JA=
github.com/hyperledger/firefly-transaction-manager v1.3.16 h1:rW6rptO4LcOeUYVOMTyvsfPcOzNLBpmBTj4T6n0/vpY=
github.com/hyperledger/firefly-transaction-manager v1.3.16/go.mod h1:UT4Cijjsz5AqiXa9H3GUiT2vm2Hq1wEgT0n/shsYZp0=
github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA=
github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4=
github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY=
Expand Down
3 changes: 2 additions & 1 deletion internal/ethereum/blocklistener.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ func (bl *blockListener) listenLoop() {
failCount++
continue
}
log.L(bl.ctx).Debugf("Block filter received new block hashes: %+v", blockHashes)

update := &ffcapi.BlockHashEvent{GapPotential: gapPotential, Created: fftypes.Now()}
var notifyPos *list.Element
Expand Down Expand Up @@ -260,7 +261,7 @@ func (bl *blockListener) listenLoop() {
default:
candidate := bl.reconcileCanonicalChain(bi)
// Check this is the lowest position to notify from
if candidate != nil && (notifyPos == nil || candidate.Value.(*minimalBlockInfo).number < notifyPos.Value.(*minimalBlockInfo).number) {
if candidate != nil && (notifyPos == nil || candidate.Value.(*minimalBlockInfo).number <= notifyPos.Value.(*minimalBlockInfo).number) {
notifyPos = candidate
}
}
Expand Down
Loading

0 comments on commit 57f1df0

Please sign in to comment.