Replies: 13 comments
-
你好, CKB 节点中的 indexer 模块现在已经弃用了, 所以你看到的文档可能也是过时的. 这里有一个 java SDK 搭配 ckb-indexer 使用的例子 @duanyytop 麻烦看下还有没有需要补充的, 以及需要更新的文档 |
Beta Was this translation helpful? Give feedback.
-
好的 感谢! 我先试试看,有问题在沟通 |
Beta Was this translation helpful? Give feedback.
-
推荐使用 ckb-indexer,CKB 内置的 indexer 例子已经在 Java SDK 最新的版本中去掉 |
Beta Was this translation helpful? Give feedback.
-
关于开启ckb-indexer模块,我安装之前你们技术人员给的建议,ckb.toml 配置文件找到 modules = ["Net", "Pool", "Miner", "Chain", "Stats", "Subscription", "Experiment"] 添加了 indexer,但是在调用get_cells_capacity时提示Method not found,请问是因为这个模块没有开启吗?并且我看到你例子中有一个专门的CKB_INDEXER_URL,但是在配置文件中只有一个rpc的监听地址。 |
Beta Was this translation helpful? Give feedback.
-
ckb-indexer 和内置的 indexer 属于两个不同的东西,前者是一个单独的 indexer 服务,跟 ckb 节点是完全解耦的,后者是内置在 ckb 节点的,目前后者已经在最新的 ckb 版本中废弃了。CKB_INDEXER_URL 是 ckb-indexer 部署后的访问地址。 ckb-indexer 的项目地址和详细文档可以参考:https://github.com/nervosnetwork/ckb-indexer |
Beta Was this translation helpful? Give feedback.
-
Testnet Indexer RPC: https://testnet.ckb.dev/indexer_rpc |
Beta Was this translation helpful? Give feedback.
-
意思是我要在单独部署一个ckb-indexer的服务是吗 |
Beta Was this translation helpful? Give feedback.
-
是的,你可以自己部署 ckb-indexer 服务,也可以用我们提供的公共服务 |
Beta Was this translation helpful? Give feedback.
-
麻烦在问下ckb-indexer自己部署需要怎么配置呢 |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
你好,我这边把ckb-indexer装上了,但是他指向的是 127.0.0.1:8116,我找了一遍没有看到有关于端口的配置文件,需要设置局域网访问是需要修改哪里的配置文件还是在Cargo.toml文件里面添加设置呢? |
Beta Was this translation helpful? Give feedback.
-
ckb-indexer 没有配置文件,用的命令行参数,使用 --help 可以看到帮助 |
Beta Was this translation helpful? Give feedback.
-
请问是否还有问题?如果没有问题的话,麻烦关闭该 issue,谢谢 |
Beta Was this translation helpful? Give feedback.
-
通过CellCollectorWithIndexer类的getCapacityWithAddress(address)方法查询获取余额为0。
后续根据文档修改
添加并开启ndexer模块,通过lockhash,调用index_lock_hash指定索引lockhash,在调用 get_lock_hash_index_states确认索引状态,最终在调用getCapacityWithAddress(address)方法 查询余额还是0。(index_lock_hash和get_lock_hash_index_states返回的参数都是一样的)
目前还是无法获取到余额,麻烦帮忙解答一下。感谢!
Beta Was this translation helpful? Give feedback.
All reactions