Fix nil pointer dereference.
Ran into by @toddfries and brought up on IRC.
This commit is contained in:
parent
d179af8ecf
commit
29fef9ffd2
1 changed files with 1 additions and 1 deletions
2
tx/tx.go
2
tx/tx.go
|
@ -1307,7 +1307,7 @@ func (rt *RecvTxOut) Addresses(net btcwire.BitcoinNet) (btcscript.ScriptClass,
|
||||||
// IsCoinbase returns whether the received transaction output is an output
|
// IsCoinbase returns whether the received transaction output is an output
|
||||||
// a coinbase transaction.
|
// a coinbase transaction.
|
||||||
func (rt *RecvTxOut) IsCoinbase() bool {
|
func (rt *RecvTxOut) IsCoinbase() bool {
|
||||||
if rt.recvTxOut.block != nil {
|
if rt.recvTxOut.block == nil {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
return rt.recvTxOut.block.Index == 0
|
return rt.recvTxOut.block.Index == 0
|
||||||
|
|
Loading…
Reference in a new issue