From 0c160a81fe3f2bc03ab179489373af9456d28b4f Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Tue, 3 Sep 2019 18:01:37 +0300 Subject: [PATCH] transaction: use increments instead of '+1's Fixes golint warning: should replace sz += 1 with sz++ Refs. #213. --- pkg/core/transaction/publish.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/core/transaction/publish.go b/pkg/core/transaction/publish.go index 526dc8e73..3a3c735f3 100644 --- a/pkg/core/transaction/publish.go +++ b/pkg/core/transaction/publish.go @@ -78,9 +78,9 @@ func (tx *PublishTX) EncodeBinary(w io.Writer) error { func (tx *PublishTX) Size() int { sz := util.GetVarSize(tx.Script) + util.GetVarSize(uint64(len(tx.ParamList))) sz += 1 * len(tx.ParamList) - sz += 1 + sz++ if tx.Version >= 1 { - sz += 1 + sz++ } sz += util.GetVarSize(tx.Name) + util.GetVarSize(tx.CodeVersion) sz += util.GetVarSize(tx.Author) + util.GetVarSize(tx.Email)