你是否可以从客户端控制要将交易提交给哪个共识节点?

huangapple go评论52阅读模式
英文:

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 = { &quot;127.0.0.1:50211&quot;: &quot;0.0.3&quot; };
  const customClient = Client.forNetwork(node).setMirrorNetwork(
    &quot;custom.mirrornode.com:5600&quot;
  );

</details>



huangapple
  • 本文由 发表于 2023年6月5日 15:51:24
  • 转载请务必保留本文链接:https://go.coder-hub.com/76404458.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定