FISCO-BCOS / FISCO-BCOS/FISCO-BCOS-DOC

合约事件推送的SampleCode中BlockNumber是BigInteger所以直接复制过来用会编译错误

Open
#1,795 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
197
Forks
281
Avg merge
2m
Merged PRs (30d)
1

Description

https://fisco-bcos-doc.readthedocs.io/zh-cn/latest/docs/sdk/java_sdk/event_sub.html#id7

几个示例中的Block参数是BigInteger,所以编译的时候报错。
```java
// 全部Event fromBlock设置为 -1
params.setFromBlock(-1); //应该是==> params.setFromBlock(new BigInteger("-1"));

// toBlock设置为-1,处理至最新区块继续等待新的区块
params.setToBlock(-1); //应该是==> params.setToBlock(new BigInteger("-1"));
```

Contributor guide

Open the contributing guide

Research direction

Open the linked event-subscription documentation and inspect the sample code containing the fromBlock and toBlock assignments. Update the examples so their -1 values match the BigInteger parameter type, then verify that the copied Java snippets no longer produce the reported compilation error.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.