diff --git a/payouts/payer.go b/payouts/payer.go index 8a960d5e1..687fc476a 100644 --- a/payouts/payer.go +++ b/payouts/payer.go @@ -200,7 +200,7 @@ func (u *PayoutsProcessor) process() { if err != nil { log.Printf("Failed to get tx receipt for %v: %v", txHash, err) } - if receipt != nil { + if receipt != nil && receipt.Confirmed() { break } } diff --git a/rpc/rpc.go b/rpc/rpc.go index 6b4b90264..766e8f092 100644 --- a/rpc/rpc.go +++ b/rpc/rpc.go @@ -47,8 +47,13 @@ type GetBlockReplyPart struct { } type TxReceipt struct { - TxHash string `json:"transactionHash"` - GasUsed string `json:"gasUsed"` + TxHash string `json:"transactionHash"` + GasUsed string `json:"gasUsed"` + BlockHash string `json:"blockHash"` +} + +func (r *TxReceipt) Confirmed() bool { + return len(r.BlockHash) > 0 } type Tx struct {