forked from Qortal/qortal
4c6656dd17
API call GET /addresses/online reports online accounts, including both addresses relating to the proxy-forge public key. New PeerChainTipData class to replace the broken "peer data lock" that was supposed to make sure peer's last height/blockSig/timestamp were all in sync. Now peer's chain tip data is a single object reference that can be replaced in one go. Removed pointless API calls /blocks/time and /blocks/{generatingbalance}. Various changes, mostly in Block class, to do with switching to BlockTimingByHeight from old min/max block time. New block 'weight' based on number of online accounts and 'distance' of perturbed generator public key from 'ideal' public key (for that particular block's height). New sub-chain 'weight' based on accumulating block weights, currently by shifting previous accumulator left by 8 bits then adding next block's weight. More validation of BlockChain config. Helpful for debugging, probably not very useful to end-users. BlockGenerator now uses unified Peer predicates from Controller, like: Controller.hasMisbehaved, Controller.hasNoRecentBlock, etc. Controller now keeps a list of chain-tip signatures that are for inferior chains, so it doesn't try to synchronize with peers with inferior chains. (This list is wiped when node's blockchain changes/block is generated). Controller now asks Gui to display error box if it can't parse Settings. Controller.potentiallySynchronize() does more filtering of potential peers before calling actuallySynchronize(). (Mostly moved from Synchronizer, so now we expect actuallySynchronize() to do something rather than bail out because it doesn't like the peer after all). If synchronization discovers that peer has an inferior chain, then Controller notifies that peer of our superior chain, to help keep the network in sync. Renamed OnlineAccount to OnlineAccountData, as it is in package org.qora.data after all... Synchronizer reworked to request block summaries so it can judge which chain is better, and hence whether to sync with peer or abort. Slight optimization of Peer.readChannel() to exit earlier if no more network messages can be extracted from buffer. More tests. Improved documentation and logging. |
||
---|---|---|
.. | ||
java/org | ||
resources |