refactor: Refactor duplicated code into LockHeld()
refactor: Refactor duplicated code into LockHeld()

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