hedera-sdk-go
hedera-sdk-go copied to clipboard
Error when calling NewAccountCreateTransaction
Description
I'm following the getting started tutorial and getting an error on Step 3
of Create an account
:
panic: runtime error: index out of range [1] with length 1
goroutine 1 [running]:
github.com/hashgraph/hedera-sdk-go/v2.(*Transaction).GetTransactionHashPerNode(0xc0001fac60)
/home/asim/go/pkg/mod/github.com/hashgraph/hedera-sdk-go/[email protected]/transaction.go:422 +0x2d5
github.com/hashgraph/hedera-sdk-go/v2.(*Transaction).GetTransactionHash(0xc0001fac60)
/home/asim/go/pkg/mod/github.com/hashgraph/hedera-sdk-go/[email protected]/transaction.go:393 +0x33
github.com/hashgraph/hedera-sdk-go/v2.(*AccountCreateTransaction).Execute(0xc0001fac60, 0xc0001f2a00)
/home/asim/go/pkg/mod/github.com/hashgraph/hedera-sdk-go/[email protected]/account_create_transaction.go:490 +0x525
main.main()
/home/asim/labs/hedera/hedera-go-examples/hedera_examples.go:50 +0x805
exit status 2
I copied and pasted the code from the tutorial and haven't made any changes to it.
After debugging a little further I can see the following error status: StatusInvalidNodeAccount
Steps to reproduce
- Follow the getting started tutorial until the end of https://docs.hedera.com/guides/getting-started/create-an-account
- Execute
go run hedera_examples.go
Additional context
No response
Hedera network
testnet
Version
v2
Operating system
Linux
Yes, I will have pr for this soon, for now u can solve it by manually setting node account ids.
Thanks, got it working now by manually setting the node account id.
@asimlqt can uu please share the line code, or documentation.. thank you!
Hi @zolmine this should be resolved with https://github.com/hashgraph/hedera-sdk-go/pull/582 Can you try with the latest version of the SDK and following the docs: https://docs.hedera.com/guides/getting-started/create-an-account Please let us know if this works for you
Hi @zolmine, closing this for now as resolved. Feel free to reopen if you face this issue again or file another ticket.