* wip
* big refactor, regretting doing this now
* PeerAddr everywhere
* cleanup
* fixup server tests
* peers api working for GET, POST is still WIP
* we can now ban/unban peers by ip only (port optional)
* chore: replace trim_right with $ sed -i'' 's/trim_right/trim_end/' **/*.rs
* docs: individually document macros to avoid warning, add TODO to make to_edge hygenic
* docs: document impl_array_newtype macros, refactor: move all impl_array_newtype macro traits into impl_array_netype_index
* fix: Fix race condition with dandelion_relay peer map and make more semantic
* Fix bug where we don't actually re-read the dandelion_relay variable after refreshing it
If WouldBlock error happens Stratum server drops part of a message to
read or write. This PR inroduces a worker's buffer to store partially
read message which will be completed next time. For write the existing
util function is used.
Fixes#2524
* Allow to have more than min_peers/2 outbound peers
Default value is 8, so we allow only 4 outbound peers, unfortunately if a node is behind NAT it can't get inbound peers and it stucks with 4 peers as maximum.
This PR allows a number of outbound peers to be between min_peers and max_peers/2. Node behind NAT will eventually have just min_peers number of peers.
* Extract into healthy_peers_mix function
* Add a slate version field
* Move current slate version to constant
* Change slate version to uint
* Add default 0 incase it's missing (pre-versioning)
* move slate initialisation outside of selection function
* refactor internal tx lib to support recipient (or anyone else) first models
* rustfmt
* rework init api function
* rustfmt
* refactor wallet lock closures to a defined fnmut type
* rustfmt
* comments for clarification
* rework bucket txs
* introduce max_block_weight to global (based on chain_type)
not yet in use anywhere...
* now using global::max_block_weight() everywhere
* testing max_block_weight needs to be big enough to cover existing chain tests...
* add some test coverage for prepare mineable transactions at the block weight limit
introduce AsLimitedTx{max_weight} so we can build artifically small blocks (per mining config)
* cleanup
* default_mineable_max_weight is just the default max_block_weight
we do not need to account for coinbase reward here (tx vs block)
* 75 change outputs in a test is not valid now that we have a low block weight limit...
* Refresh coinbase key if the existing was removed
It happens if `wallet check` runs in parallel.
Alternative solution is not to remove it during the check.
Fixes#2412
* Save and display optional slate messages
* rustfmt
* fixes and test updates
* rustfmt
* output json
* rustfmt
* add better serialisation of slate message, rename to secp_ser, add tests for serialization functions
* rustfmt
* max length for message enforced by API
* rustfmt