Skip to content

Commit

Permalink
add new status and return if tx is orphaned
Browse files Browse the repository at this point in the history
  • Loading branch information
ssilagadze committed Nov 20, 2023
1 parent e80677f commit c5d236e
Show file tree
Hide file tree
Showing 8 changed files with 57 additions and 52 deletions.
2 changes: 1 addition & 1 deletion blocktx/blocktx_api/blocktx_api.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion blocktx/blocktx_api/blocktx_api_grpc.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion callbacker/callbacker_api/callbacker_api.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion callbacker/callbacker_api/callbacker_api_grpc.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

92 changes: 48 additions & 44 deletions metamorph/metamorph_api/metamorph_api.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion metamorph/metamorph_api/metamorph_api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ enum Status {
SENT_TO_NETWORK = 6;
ACCEPTED_BY_NETWORK = 7;
SEEN_ON_NETWORK = 8;
MINED = 9;
ORPHANED = 9;
MINED = 10;
CONFIRMED = 108; // 100 confirmation blocks
REJECTED = 109;
}
Expand Down
2 changes: 1 addition & 1 deletion metamorph/metamorph_api/metamorph_api_grpc.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions metamorph/zmq.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ func (z *ZMQ) Start(zmqi ZMQI) {
}
if txInfo.IsMissingInputs {
z.Logger.Debugf("invalidtx %s due to missing inputs ignored", txInfo.TxID)
errReason = "Transaction " + txInfo.TxID + " is currently orphaned"
status = metamorph_api.Status_SENT_TO_NETWORK
errReason = ""
status = metamorph_api.Status_ORPHANED
}
if txInfo.IsDoubleSpendDetected {
errReason += " - double spend"
Expand Down

0 comments on commit c5d236e

Please sign in to comment.