-
-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix force accept of invalid consignments #29
Conversation
I tried this PR on the sandbox branch mentioned in #24, and it seems this fix is not enough to solve the issue. for (operation, _) in &self.end_transitions {
if let Some(anchor) = self.anchor_index.get(&operation.id()) {
if let Some(pos) = self
.status
.failures
.iter()
.position(|f| f == &Failure::SealNoWitnessTx(anchor.txid))
{
self.status.failures.remove(pos);
self.status
.unresolved_txids
.retain(|txid| *txid != anchor.txid);
self.status.unmined_terminals.push(anchor.txid);
self.status
.warnings
.push(Warning::TerminalWitnessNotMined(anchor.txid));
}
}
} so only if a This explains why in the sandbox the validation status results in:
when we validate the consignment before broadcasting the TX, while after broadcasting the TX (not mining any block afterwards) the validation status becomes:
If I didn't misunderstand the meaning of |
Consignment is valid whenever resolver returns transaction given tx id. RGB has not concept of mempool. You just need to write resolver that wouldn't return tx until it is mined or has 3 confirmations - whatever the wallet policy is. |
I find naming a bit confusing then. |
We can't change names without breaking API, thus it must be an independent PR targeting v0.11. Thus this PR hsould be merged first even if we will change the names after. |
762b58b
to
581ebed
Compare
Codecov Report
@@ Coverage Diff @@
## master #29 +/- ##
=====================================
Coverage 0.0% 0.0%
=====================================
Files 8 8
Lines 817 824 +7
=====================================
- Misses 817 824 +7
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Closes #24