Simplify comparisons
len(byte[][]) is defined as zero when the value is nil
This commit is contained in:
parent
e87ffec75c
commit
34499406cf
@ -92,7 +92,7 @@ func (mq *MQ) run(callback func(NotificationType)) {
|
||||
} else {
|
||||
repeatedError = false
|
||||
}
|
||||
if msg != nil && len(msg) >= 3 {
|
||||
if len(msg) >= 3 {
|
||||
var nt NotificationType
|
||||
switch string(msg[0]) {
|
||||
case "hashblock":
|
||||
|
||||
@ -188,7 +188,7 @@ func (c *fakeBlockChain) GetTransactionForMempool(txid string) (v *bchain.Tx, er
|
||||
}
|
||||
|
||||
func (c *fakeBlockChain) EstimateSmartFee(blocks int, conservative bool) (v big.Int, err error) {
|
||||
if conservative == false {
|
||||
if !conservative {
|
||||
v.SetInt64(int64(blocks)*100 - 1)
|
||||
} else {
|
||||
v.SetInt64(int64(blocks) * 100)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user