Comments (3)
"Is it per design that when a Spark mint or spend is fired off there is no chance to stop it anymore even when unconfirmed?"
Generally, this is the case though once it's broadcasted as we don't support RBF which to me introduces more issues than solves. Is this what you mean?
from firo.
Hi @reubenyap,
this is to some extend what I mean, yes. let's take a look e.g. at Bitcoin core.
bool CWallet::AbandonTransaction(const uint256& hashTx)
{
LOCK(cs_wallet);
// Can't mark abandoned if confirmed or in mempool
auto it = mapWallet.find(hashTx);
assert(it != mapWallet.end());
const CWalletTx& origtx = it->second;
if (GetTxDepthInMainChain(origtx) != 0 || origtx.InMempool()) {
return false;
}
auto try_updating_state = [](CWalletTx& wtx) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet) {
// If the orig tx was not in block/mempool, none of its spends can be.
assert(!wtx.isConfirmed());
assert(!wtx.InMempool());
// If already conflicted or abandoned, no need to set abandoned
if (!wtx.isConflicted() && !wtx.isAbandoned()) {
wtx.m_state = TxStateInactive{/*abandoned=*/true};
return TxUpdate::NOTIFY_CHANGED;
}
return TxUpdate::UNCHANGED;
};
// Iterate over all its outputs, and mark transactions in the wallet that spend them abandoned too.
// States are not permanent, so these transactions can become unabandoned if they are re-added to the
// mempool, or confirmed in a block, or conflicted.
// Note: If the reorged coinbase is re-added to the main chain, the descendants that have not had their
// states change will remain abandoned and will require manual broadcast if the user wants them.
RecursiveUpdateTxState(hashTx, try_updating_state);
return true;
}
When trying to abandon, it checks whether it has been confirmed yet, if so no chance to do anything further, on the other hand when not confirmed attempt to catch it from the mempool to abandon.
Where are the use cases? E.g. from a CEX when you send out your coins some offer the possibility to stop the payout while there's no confirmation.
I came along this point when looking further into #1328 how to e.g. "cancel" a stuck mint.
from firo.
As far as I know from a CEX is when the transaction hasn't been broadcasted out you can cancel it when it's still processing, but once it's broadcast, you can't.
from firo.
Related Issues (20)
- synchronization at the beginning was a little too long
- synchronization at the beginning was a little too long HOT 1
- Celebrating the Phenomenal Spark Testnet Launched Wallet Feature
- UI
- resolusi and node HOT 1
- facets not working HOT 2
- settings HOT 1
- The wallet starts immediately without re-entering keywords to confirm HOT 1
- UI :: QR Code --> address underneath HOT 4
- automintspark & gasfee settings leads to unmined spark mints HOT 6
- Getwalletinfo returns zero as balance. HOT 1
- Update Help Documentation example HOT 2
- Receiving addresses not showing rpc generate spark address HOT 1
- QT: Columns in Transaction tab too wide on startup HOT 1
- removetxmempool uncomplete HOT 4
- Note typos HOT 2
- UpdateSpendState & UpdateMintState commented code -- sparkwallet.cpp HOT 1
- View Keys and Payment Proves HOT 1
- processing block HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from firo.