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 {
|
} else {
|
||||||
repeatedError = false
|
repeatedError = false
|
||||||
}
|
}
|
||||||
if msg != nil && len(msg) >= 3 {
|
if len(msg) >= 3 {
|
||||||
var nt NotificationType
|
var nt NotificationType
|
||||||
switch string(msg[0]) {
|
switch string(msg[0]) {
|
||||||
case "hashblock":
|
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) {
|
func (c *fakeBlockChain) EstimateSmartFee(blocks int, conservative bool) (v big.Int, err error) {
|
||||||
if conservative == false {
|
if !conservative {
|
||||||
v.SetInt64(int64(blocks)*100 - 1)
|
v.SetInt64(int64(blocks)*100 - 1)
|
||||||
} else {
|
} else {
|
||||||
v.SetInt64(int64(blocks) * 100)
|
v.SetInt64(int64(blocks) * 100)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user