Created
June 13, 2023 01:09
-
-
Save yuyaogawa/487f88b9ee1996cc5b50245ff8396eb8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from glclient import TlsConfig, Scheduler, Signer | |
seed=b'my-seed' | |
cert = "my-cert" | |
key = "my-key" | |
node_id = bytes.fromhex("02a5b6a3fe53c39edb348818b4a145c830db90cbc410ac52ce16e985e7f0b37e86") | |
network = "mainnet" | |
tls = TlsConfig() | |
tls = tls.identity(cert, key) | |
scheduler = Scheduler(node_id, network, tls) | |
node = scheduler.node() | |
signer = Signer(seed, network="mainnet", tls=tls) | |
signer.run_in_thread() | |
info = node.get_info() | |
print(info) |
Wait... Actually I have to set network option to bitcoin
for mainnet. That's why I got the error???
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When I run this code I get this error.
But when I replace network option with
testnet
I get a response as follow.I don't remember but I might called
register
withmainnet
to register a node for the first time. Then my node was allocated asmainnet
. But it seems weird since I have to call withtestnet
ever then for this instance.