closes#7.
adds a blockchain watchdog that checks every hour if the tip height has
advanced or not. Sends alert email if height is less or equal to
height at the last check and enters a warning mode. In warning mode
it waits until the height is greater than previous, and then sends a
recovery alert and switches to normal mode.
Closes#5
Addresses #6
changes:
* field Mining Reward --> Coinbase. (actual reward)
* add field Expected Coinbase (expected/calced reward)
this field only displays if different from actual coinbase.
* add field Cumulative Proof-of-Work
* change tooltip 🛈 --> ⓘ . for mobile devices. (hopefully)
* css: make tooltip text bold, so the ⓘ is stronger.
Adds a 'Canonical' field to the /block page.
note: this requires updating neptune-core in order to obtain the field
from neptune-core's /block_info rpc endpoint.
it was also necessary to change 'use neptune_core::<x>" statements to
'use neptune_cash::<x>'
ArcSwap is lock-free and optimized for our use-case of lots of
concurrent reads and infrequent updates.
So it is pretty close to a shared-nothing architecture.
Some small changes were necessary, but its mostly a drop-in
replacement for RwLock.
closes#1
Implements a background watchdog task that:
1. calls neptune-core /network rpc every N seconds (default: 10)
2. emits log message on any state change
3. sends detailed email alert to admin on any state change
Changes:
* AppState now has internal Arc<RwLock<AppStateInner>> to permit
watchdog task to mutate the rpc_client field.
* adjust application to AppState changes (use locks)
* not_found functions no longer accept state arg
* move state initialization into AppState::init()
* add optional alert parameters: admin-email, smtp-*
* add neptune_rpc module with watchdog task
* add alert_email module
* simplify main()
* log warnings if alert parameters not set
* add chrono dep
* add lettre dep
implements a generic solution to redirect query strings generated by
forms to path based URIs that can be handled by existing routes.
This eliminates the need for javascript that was doing the equivalent
client-side.