From e70daa531bc3e6dd4b1d6f5c29463af92056c0a9 Mon Sep 17 00:00:00 2001 From: Mark Beamer Jr Date: Sat, 16 Mar 2019 19:23:23 -0400 Subject: [PATCH] -Added check for 0 blockheight before setting claim height. --- daemon/processing/claim.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/daemon/processing/claim.go b/daemon/processing/claim.go index e5d4ed5..dbf0278 100644 --- a/daemon/processing/claim.go +++ b/daemon/processing/claim.go @@ -78,7 +78,9 @@ func processClaimNameScript(script *[]byte, vout model.Output, tx model.Transact claim.Name = name claim.TransactionTime = tx.TransactionTime claim.ClaimAddress = lbrycrd.GetAddressFromPublicKeyScript(pkscript) - claim.Height = uint(blockHeight) + if blockHeight > 0 { + claim.Height = uint(blockHeight) + } err = datastore.PutClaim(claim) return name, claimid, pkscript, err @@ -123,7 +125,9 @@ func processClaimUpdateScript(script *[]byte, vout model.Output, tx model.Transa } claim.TransactionTime = tx.TransactionTime claim.ClaimAddress = lbrycrd.GetAddressFromPublicKeyScript(pubkeyscript) - claim.Height = uint(blockHeight) + if blockHeight > 0 { + claim.Height = uint(blockHeight) + } claim.TransactionHashID.SetValid(tx.Hash) claim.Vout = vout.Vout if claim.BidState == "Spent" {