* Minor update for foreign api docs. Peers seems to be no longer needed as an arg in the grin_api::Foreign::new.
* This changes foreign_rpc and owner_rpc modules to public so the helper modules for the rpc clients can be accessible in external projects.
* Updated test seeds.
* Added functions that override the one time globals. This is needed for the grin-gui so it can change the global contexts when it needs to switch from testnet to mainnet.
* Refactor
* Fix panick at 'attempt to subtract with overflow' when grin-wallet sends in a start_index of 0 for new wallets.
* Fix overflow panic using saturating_sub(1).
* add segmenter for generating segments from txhashset with consistent rewind
* rework segmenter to take a txhashset wrapped in rwlock
rework our rewindable pmmr so we can convert to readonly easily
* placeholder code for rewinding readonly txhashset extension to build a rangeproof segment
* segment creation for outputs/rangeproofs/kernels/bitmaps
* placeholder segment impl
* commit
* rework segmenter to use a cached bitmap (rewind is expensive)
* cache segmenter instance based on current archive header
* integrate the real segment and segment identifier with our segmenter
* exercise the segmenter code on chain init
* wrap accumulator in an arc, no need to clone each time
* Introduce GLOBAL_CHAIN_TYPE and make CHAIN_TYPE thread_local.
This makes testing more explicit and significantly more robust.
* set_local_chain_type() in tests
* cleanup - weird
* get pool tests working with explicit local chain_type config
* core tests working with explicit local chain_type
* p2p tests working with explicit local chain_type
* store tests working
* cleanup, feedback
Currently we pass a Vec. This requires an extra allocation and copy of all elements if a caller doesn't have a Vec already, which is at least 95% of cases.
Another, a smaller issue, we have a function util::to_hex and some structs implement to_hex() on top of it, so we have a mix of it in the code. This PR introduces a trait and a blanket impl for AsRef<[u8]> which brings a uniform API (obj.to_hex()). One unfortunate case is arrays of size bigger than 32 - Rust doesn't implement AsRef for them so it requires an ugly hack (&array[..]).to_hex().
* Refactor SyncState
Method sync_error() retrun type was simplified.
update_txhashset_download() was made type safe, which eliminates a runtime enum variant's check, added an atomic status update
* fix: add logs page to TUI
* chore: print panic traces to TUI logs
* chore: stop and start tui nicely and a bit of refactoring
* chore: rustfmt
* chore: typo
* chore: use sync_channel for logs
* chore: don't try to unwrap err on try_send log message
* chore: fix compiler/lint warnings
* fix: Only create logs channel if TUI is enabled and resovle other small review comments
* fix: wrap logs in TUI to fix window size
* fix: debug and trace logs appear white in the TUI logs