Skip to content

Commit

Permalink
Add parity quirks mode for pending tx check
Browse files Browse the repository at this point in the history
  • Loading branch information
sammy007 committed Aug 12, 2016
1 parent 1239e5e commit 1a40507
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion payouts/payer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down
9 changes: 7 additions & 2 deletions rpc/rpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 1a40507

Please sign in to comment.