validation: delay flushing undo files in syncing node case
validation: delay flushing undo files in syncing node case

Data files are pre-allocated, and upon flush/finalization, they are trimmed down to their resulting size.
Block (blk) files are written to disk as blocks come in, which is often out of order, whereas undo (rev) files are written sequentially, as each block is added to the top of the chain.
When a block file hits the size limit, the system flushes and trims the file down to its final size, and moves on to the next block file.

Case 1: blocks are added to the chain as they come in (synced up node case) -- in this case, we will flush and finalize the undo file together with the block file.

Case 2: blocks are added to the chain after they have been downloaded (syncing node case) -- in this case, we postpone finalizing the undo file until we know the undo data for the last block in the file has been written to disk.

kallewoof/bitcoin,tecnovert/particl-core,GroestlCoin/bitcoin,dscotese/bitcoin,particl/particl-core,namecoin/namecore,particl/particl-core,fujicoin/fujicoin,namecoin/namecore,n1bor/bitcoin,qtumproject/qtum,MarcoFalke/bitcoin,litecoin-project/litecoin,ajtowns/bitcoin,bitcoin/bitcoin,apoelstra/bitcoin,apoelstra/bitcoin,instagibbs/bitcoin,alecalve/bitcoin,ajtowns/bitcoin,MarcoFalke/bitcoin,pataquets/namecoin-core,MeshCollider/bitcoin,tecnovert/particl-core,kallewoof/bitcoin,namecoin/namecoin-core,rnicoll/dogecoin,Xekyo/bitcoin,AkioNak/bitcoin,jonasschnelli/bitcoin,n1bor/bitcoin,litecoin-project/litecoin,domob1812/namecore,AkioNak/bitcoin,GroestlCoin/bitcoin,ElementsProject/elements,prusnak/bitcoin,sipsorcery/bitcoin,lateminer/bitcoin,rnicoll/dogecoin,instagibbs/bitcoin,qtumproject/qtum,jnewbery/bitcoin,anditto/bitcoin,ajtowns/bitcoin,yenliangl/bitcoin,instagibbs/bitcoin,prusnak/bitcoin,achow101/bitcoin,kallewoof/bitcoin,cdecker/bitcoin,midnightmagic/bitcoin,litecoin-project/litecoin,fujicoin/fujicoin,JeremyRubin/bitcoin,prusnak/bitcoin,pataquets/namecoin-core,EthanHeilman/bitcoin,instagibbs/bitcoin,sstone/bitcoin,ElementsProject/elements,bitcoin/bitcoin,achow101/bitcoin,GroestlCoin/GroestlCoin,pstratem/bitcoin,andreaskern/bitcoin,jamesob/bitcoin,cdecker/bitcoin,MeshCollider/bitcoin,anditto/bitcoin,rnicoll/bitcoin,namecoin/namecoin-core,MeshCollider/bitcoin,JeremyRubin/bitcoin,lateminer/bitcoin,alecalve/bitcoin,mm-s/bitcoin,fanquake/bitcoin,jamesob/bitcoin,mm-s/bitcoin,sstone/bitcoin,ajtowns/bitcoin,fujicoin/fujicoin,GroestlCoin/bitcoin,anditto/bitcoin,sipsorcery/bitcoin,pstratem/bitcoin,midnightmagic/bitcoin,sipsorcery/bitcoin,rnicoll/bitcoin,andreaskern/bitcoin,anditto/bitcoin,ElementsProject/elements,qtumproject/qtum,jlopp/statoshi,mruddy/bitcoin,GroestlCoin/bitcoin,jambolo/bitcoin,andreaskern/bitcoin,instagibbs/bitcoin,jlopp/statoshi,lateminer/bitcoin,practicalswift/bitcoin,particl/particl-core,GroestlCoin/GroestlCoin,prusnak/bitcoin,domob1812/bitcoin,jambolo/bitcoin,lateminer/bitcoin,bitcoinsSG/bitcoin,pataquets/namecoin-core,namecoin/namecore,apoelstra/bitcoin,kallewoof/bitcoin,achow101/bitcoin,apoelstra/bitcoin,mm-s/bitcoin,JeremyRubin/bitcoin,yenliangl/bitcoin,midnightmagic/bitcoin,JeremyRubin/bitcoin,mruddy/bitcoin,MarcoFalke/bitcoin,yenliangl/bitcoin,AkioNak/bitcoin,n1bor/bitcoin,bitcoinsSG/bitcoin,EthanHeilman/bitcoin,jamesob/bitcoin,jlopp/statoshi,EthanHeilman/bitcoin,Sjors/bitcoin,bitcoin/bitcoin,Xekyo/bitcoin,fujicoin/fujicoin,mruddy/bitcoin,bitcoinknots/bitcoin,bitcoin/bitcoin,cdecker/bitcoin,practicalswift/bitcoin,mm-s/bitcoin,namecoin/namecoin-core,jamesob/bitcoin,andreaskern/bitcoin,practicalswift/bitcoin,jonasschnelli/bitcoin,jnewbery/bitcoin,Xekyo/bitcoin,practicalswift/bitcoin,jnewbery/bitcoin,fanquake/bitcoin,andreaskern/bitcoin,tecnovert/particl-core,domob1812/bitcoin,namecoin/namecore,cdecker/bitcoin,alecalve/bitcoin,litecoin-project/litecoin,rnicoll/bitcoin,jnewbery/bitcoin,n1bor/bitcoin,domob1812/namecore,achow101/bitcoin,namecoin/namecoin-core,AkioNak/bitcoin,pataquets/namecoin-core,namecoin/namecore,sstone/bitcoin,yenliangl/bitcoin,particl/particl-core,JeremyRubin/bitcoin,MeshCollider/bitcoin,litecoin-project/litecoin,fanquake/bitcoin,mruddy/bitcoin,qtumproject/qtum,bitcoinsSG/bitcoin,bitcoinknots/bitcoin,jambolo/bitcoin,AkioNak/bitcoin,GroestlCoin/bitcoin,jambolo/bitcoin,rnicoll/dogecoin,tecnovert/particl-core,sipsorcery/bitcoin,bitcoinsSG/bitcoin,JeremyRubin/bitcoin,domob1812/namecore,AkioNak/bitcoin,sipsorcery/bitcoin,rnicoll/dogecoin,jonasschnelli/bitcoin,rnicoll/dogecoin,jonasschnelli/bitcoin,sipsorcery/bitcoin,andreaskern/bitcoin,GroestlCoin/GroestlCoin,GroestlCoin/GroestlCoin,ElementsProject/elements,sstone/bitcoin,Sjors/bitcoin,rnicoll/bitcoin,litecoin-project/litecoin,domob1812/bitcoin,dscotese/bitcoin,ajtowns/bitcoin,pstratem/bitcoin,practicalswift/bitcoin,rnicoll/bitcoin,n1bor/bitcoin,cdecker/bitcoin,GroestlCoin/GroestlCoin,ajtowns/bitcoin,achow101/bitcoin,MarcoFalke/bitcoin,EthanHeilman/bitcoin,kallewoof/bitcoin,EthanHeilman/bitcoin,qtumproject/qtum,yenliangl/bitcoin,Sjors/bitcoin,mm-s/bitcoin,fanquake/bitcoin,mruddy/bitcoin,tecnovert/particl-core,alecalve/bitcoin,bitcoinknots/bitcoin,bitcoinknots/bitcoin,sstone/bitcoin,domob1812/bitcoin,bitcoinknots/bitcoin,namecoin/namecoin-core,yenliangl/bitcoin,practicalswift/bitcoin,n1bor/bitcoin,apoelstra/bitcoin,GroestlCoin/bitcoin,alecalve/bitcoin,rnicoll/bitcoin,fujicoin/fujicoin,fanquake/bitcoin,domob1812/namecore,bitcoin/bitcoin,MeshCollider/bitcoin,Xekyo/bitcoin,particl/particl-core,pstratem/bitcoin,midnightmagic/bitcoin,MeshCollider/bitcoin,anditto/bitcoin,pataquets/namecoin-core,jlopp/statoshi,dscotese/bitcoin,achow101/bitcoin,ElementsProject/elements,alecalve/bitcoin,jamesob/bitcoin,pataquets/namecoin-core,sstone/bitcoin,MarcoFalke/bitcoin,pstratem/bitcoin,domob1812/namecore,lateminer/bitcoin,jnewbery/bitcoin,lateminer/bitcoin,dscotese/bitcoin,cdecker/bitcoin,Sjors/bitcoin,namecoin/namecore,instagibbs/bitcoin,bitcoinsSG/bitcoin,mruddy/bitcoin,apoelstra/bitcoin,midnightmagic/bitcoin,anditto/bitcoin,domob1812/bitcoin,jamesob/bitcoin,qtumproject/qtum,kallewoof/bitcoin,bitcoin/bitcoin,particl/particl-core,midnightmagic/bitcoin,fanquake/bitcoin,GroestlCoin/GroestlCoin,dscotese/bitcoin,bitcoinsSG/bitcoin,jlopp/statoshi,ElementsProject/elements,jlopp/statoshi,mm-s/bitcoin,jonasschnelli/bitcoin,EthanHeilman/bitcoin,namecoin/namecoin-core,domob1812/namecore,pstratem/bitcoin,Xekyo/bitcoin,jambolo/bitcoin,Sjors/bitcoin,prusnak/bitcoin,Xekyo/bitcoin,fujicoin/fujicoin,dscotese/bitcoin,jambolo/bitcoin,qtumproject/qtum,MarcoFalke/bitcoin,domob1812/bitcoin,tecnovert/particl-core,prusnak/bitcoin