From 2af266dbfbeec9b76e9ceca91427b806f374cfa0 Mon Sep 17 00:00:00 2001 From: cxzhao <1037089219@qq.com> Date: Fri, 17 Dec 2021 17:12:03 +0800 Subject: [PATCH] fix the ChainId was zero in new commitDpos transactions --- lib/tools.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/tools.go b/lib/tools.go index 27f70c4..b0fff84 100644 --- a/lib/tools.go +++ b/lib/tools.go @@ -170,7 +170,10 @@ func WhiteNode(cmd *cobra.Command, args []string) error { } func CreateCommitDposTx(cmd *cobra.Command, args []string) error { - poly := poly_go_sdk.NewPolySdk() + poly, _, err := GetPolyAndAccByCmd(cmd) + if err != nil { + return err + } tx, err := poly.Native.Nm.NewCommitDposTransaction() if err != nil { return err