transaction: use increments instead of '+1's

Fixes golint warning:
  should replace sz += 1 with sz++

Refs. #213.
This commit is contained in:
Roman Khimov 2019-09-03 18:01:37 +03:00
parent 30eb137200
commit 0c160a81fe

View file

@ -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)