-
Notifications
You must be signed in to change notification settings - Fork 229
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
Various cleanup, reindexing and resolving LOCK issue #68
Various cleanup, reindexing and resolving LOCK issue #68
Conversation
4287756
to
c1d4d56
Compare
Updated. The following items were added: Alert related:
The alert code is tested via unit tests (nearly) as far as possible. Fixes:
Currently the payloads for alerts are pretty different from the other transaction types, and instead of using/parsing fields, it's basically a single string, which is later splitted. This is something we might change at some point in my opinion. |
d77da31
to
52d7ef1
Compare
This RPC command is intended for maintainers, or testing purposes.
An alert, which is mined in block 350000, should be active in block 350000, and not 350001.
Determines whether the sender is an authorized source for Omni Core alerts. The option "-alertallowsender=source" can be used to whitelist additional sources, and the option "-alertignoresender=source" can be used to ignore a source. To consider any alert as authorized, "-alertallowsender=any" can be used. This should only be done for testing purposes!
For consistency.
This has an effect on mainnet, but not testnet or regtest mode.
52d7ef1
to
90cb49e
Compare
Reviewed - more great work - with HUGE thanks @dexX7 :) Supported, merge when you're ready :) |
Thanks for the fast review! :) A few quick questions: In CheckExpiredAlerts() (case 4) bool txLive = (chainActive.Height()>(int64_t) expiryValue); Was Do you agree with I'm very sure there will never be an option with this name for Bitcoin Core, but we might add an |
Well, the original intention was: I guess I didn't see much value to continuing to parse knowing that we would shutdown at some future stage of parsing. Eg if you're on mainnet with a synced up blockchain, but you download an old version of Omni Core, why waste the users time parsing up until
The second scenario doesn't hold much value, it's just extra wasted time spent parsing since the end result is still the same (client can't be used). I hope that makes sense :) I'm not super fussed though so if you have spotted a reason to use
Yeah that's an interesting Q - I think it's kind of nice to make the distinction that these startup params affect the Omni code layer only so perhaps we should standardize on making all options prefixed with
Yep, though in the context of above (ie perhaps |
Ah, I see. Hm.. I mean, it's pretty unrealistic that there are very, very large gaps between the alert transaction and the expiry value. I tend to prefer to use
Agreed. |
Are those email addresses correct?
|
Sure, go ahead and make the change mate - as I say I'm not set on using
Yeah that's the way it's supposed to work, alert is parsed, message is displayed until the tx actually goes live, at which point state can't be trusted and shutdown occurs. Could probably do with more testing though (I think that about everything though hehe)
AFAIK (assuming mastercoin.org > omni.foundation redirection is working) - though unsure for example if @m21 still checks his Omni email account. Re who has access to Exodus - @CraigSellars can you please advise who has the key for Exodus? |
fddc6fc Rename options to "-omnialertallowsender", "-omnialertignoresender" (dexX7) 90cb49e Only create class C transactions, if they are also accepted (dexX7) c48cd68 Whitelist dexX7 as source for Omni Core notifications (dexX7) d60d0ef Add unit tests for Omni Core client notifications (dexX7) cc50a35 Rename alert functions, provide return values by reference (dexX7) f6663a8 Add CheckAlertAuthorization(), "-alertallowsender", "-alertignoresender" (dexX7) e8e5989 Fix height check of CMPTxList::setLastAlert() (dexX7) a999e29 Add hidden "sendalert_OMNI" command (dexX7) 4a0226e Extend marker check to cover alerts as well (dexX7) a125b0c Support payload creation for alerts (dexX7) 4b77e41 Wrap alert code into namespace (dexX7) c1d4d56 Fully enable/support reindexing (dexX7) 8ffccbd Remove wallet LOCK in ClassAgnosticWalletTXBuilder (dexX7) e568acf Format some of the main functions (dexX7) 60ba692 Remove some old leftovers (dexX7) aa1e62f Move actual code from header into sp.cpp (dexX7) e0853f0 Push down xToString functions and friends (dexX7) 996831b Move MAX_SHA256_OBFUSCATION_TIMES to hasher (dexX7) d815b26 Move alert/notification related code into seperated file (dexX7) c932248 Move pending transactions related code into pending file (dexX7) 67e77c1 Remove unused code from omnicore.h/.cpp (dexX7)
Notable changes:
Alert related:
1dexX7zmPen1yBz2H9ZF62AK5TGGqGTZH
(resolves Grant @dexx7 alert rights #53)mk5SSx4kdexENHzLxk9FLhQdbbBexHUFTW
(resolves Grant @dexx7 alert rights #53)CreatePayload_OmniCoreAlert()
"sendalert_OMNI"
to create alerts"-alertignoresender=address"
can be used to backlist specific alert senders"-alertallowsender=address"
can be used to whitelist specific alert senders"-alertallowsender=any"
can be used to consider any source as authorized (for tests!)Fixes:
CMPTxList::setLastAlert()