Skip to content

Commit

Permalink
gofmt
Browse files Browse the repository at this point in the history
  • Loading branch information
tecnovert committed Oct 24, 2017
1 parent 545f4ac commit 0c5c536
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/partatomicswap/sizeest.go
Expand Up @@ -48,7 +48,7 @@ func sumOutputSerializeSizes(outputs []*wire.TxOut) (serializeSize int) {
}

func getVirtualSizeInner(sizeNoWitness int, sizeTotal int) int {
return ((sizeNoWitness * (WITNESS_SCALE_FACTOR-1) + sizeTotal) + WITNESS_SCALE_FACTOR-1) / WITNESS_SCALE_FACTOR
return ((sizeNoWitness*(WITNESS_SCALE_FACTOR-1) + sizeTotal) + WITNESS_SCALE_FACTOR - 1) / WITNESS_SCALE_FACTOR
}

func getVirtualSize(tx *wire.MsgTx) int {
Expand All @@ -73,7 +73,7 @@ func estimateRedeemSerializeSize(contract []byte, tx *wire.MsgTx) int {
baseSize := tx.SerializeSize()
// varintsize(height of stack) + height of stack, redeemSig, redeemPubKey, secret, b1, contract
witnessSize := 6 + 73 + 33 + 32 + 1 + len(contract)
return getVirtualSizeInner(baseSize, baseSize + witnessSize)
return getVirtualSizeInner(baseSize, baseSize+witnessSize)
}

// estimateRefundSerializeSize returns a worst case serialize size estimates for
Expand All @@ -82,5 +82,5 @@ func estimateRefundSerializeSize(contract []byte, tx *wire.MsgTx) int {
baseSize := tx.SerializeSize()
// varintsize(height of stack) + height of stack, refundSig, refundPubKey, b0, contract
witnessSize := 5 + 73 + 33 + 1 + len(contract)
return getVirtualSizeInner(baseSize, baseSize + witnessSize)
return getVirtualSizeInner(baseSize, baseSize+witnessSize)
}

0 comments on commit 0c5c536

Please sign in to comment.