英文:
Can I control which consensus node I want to submit my transaction to from the client?
问题
我正在使用Javascript SDK。目前似乎是随机的。我想要提交到特定的节点以减少延迟。
英文:
I'm using Javascript SDK. Currently it seems random. I'm wanting to submit to a specific node to reduce latency
答案1
得分: 2
是的,你可以这样做。你可以像下面的示例一样指定你想要提交交易的共识节点。
const customClient = Client.forNetwork(node).setMirrorNetwork(
"custom.mirrornode.com:5600"
);```
<details>
<summary>英文:</summary>
Yes you can do that. You can specify a consensus node you want to submit the transaction to like the example below.
```const node = { "127.0.0.1:50211": "0.0.3" };
const customClient = Client.forNetwork(node).setMirrorNetwork(
"custom.mirrornode.com:5600"
);
</details>
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论