From 5bbb12efd26090797be16a9e7747e713a0d4e909 Mon Sep 17 00:00:00 2001 From: Paladz Date: Tue, 10 Apr 2018 15:04:53 +0800 Subject: [PATCH] fix the bug (#570) --- blockchain/txbuilder/finalize.go | 5 ++--- version/version.go | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/blockchain/txbuilder/finalize.go b/blockchain/txbuilder/finalize.go index 65b01c228..043954e28 100644 --- a/blockchain/txbuilder/finalize.go +++ b/blockchain/txbuilder/finalize.go @@ -32,9 +32,8 @@ func FinalizeTx(ctx context.Context, c *protocol.Chain, tx *types.Tx) error { if err != nil { return err } - if err := tx.UnmarshalText(data); err != nil { - return err - } + tx.TxData.SerializedSize = uint64(len(data)) + tx.Tx.SerializedSize = uint64(len(data)) _, err = c.ValidateTx(tx) if errors.Root(err) == protocol.ErrBadTx { diff --git a/version/version.go b/version/version.go index ccb5ec9a7..782833d78 100644 --- a/version/version.go +++ b/version/version.go @@ -2,7 +2,7 @@ package version var ( // The full version string - Version = "0.4.4" + Version = "0.4.5" // GitCommit is set with --ldflags "-X main.gitCommit=$(git rev-parse HEAD)" GitCommit string )