transaction: use increments instead of '+1's
Fixes golint warning: should replace sz += 1 with sz++ Refs. #213.
This commit is contained in:
parent
30eb137200
commit
0c160a81fe
1 changed files with 2 additions and 2 deletions
|
@ -78,9 +78,9 @@ func (tx *PublishTX) EncodeBinary(w io.Writer) error {
|
||||||
func (tx *PublishTX) Size() int {
|
func (tx *PublishTX) Size() int {
|
||||||
sz := util.GetVarSize(tx.Script) + util.GetVarSize(uint64(len(tx.ParamList)))
|
sz := util.GetVarSize(tx.Script) + util.GetVarSize(uint64(len(tx.ParamList)))
|
||||||
sz += 1 * len(tx.ParamList)
|
sz += 1 * len(tx.ParamList)
|
||||||
sz += 1
|
sz++
|
||||||
if tx.Version >= 1 {
|
if tx.Version >= 1 {
|
||||||
sz += 1
|
sz++
|
||||||
}
|
}
|
||||||
sz += util.GetVarSize(tx.Name) + util.GetVarSize(tx.CodeVersion)
|
sz += util.GetVarSize(tx.Name) + util.GetVarSize(tx.CodeVersion)
|
||||||
sz += util.GetVarSize(tx.Author) + util.GetVarSize(tx.Email)
|
sz += util.GetVarSize(tx.Author) + util.GetVarSize(tx.Email)
|
||||||
|
|
Loading…
Reference in a new issue