Antoniy Shumanov [ARCHIVE] on Nostr: 📅 Original date posted:2019-01-30 📝 Original message:Hi, bitcoin devs. I'm ...
📅 Original date posted:2019-01-30
📝 Original message:Hi, bitcoin devs. I'm working at lbry.io and we stay closely to your core,
i want to discuss what you think about a contribution like:
base_blob and/or base_uint to be derived from std::array to be enabled move
semantics, as well on uint160, uint256, COutPoint.
Another approach that bother me is acquiring / releasing recursive mutex in
a loop, snippet from minig.cpp
while (nHeight < nHeightEnd && !ShutdownRequested())
{
std::unique_ptr<CBlockTemplate>
pblocktemplate(BlockAssembler(Params()).CreateNewBlock(coinbaseScript->reserveScript));
CBlock *pblock = &pblocktemplate->block;
{
LOCK(cs_main); // <--------- acquiring
IncrementExtraNonce(pblock, chainActive.Tip(), nExtraNonce);
} // <-------- release
std::shared_ptr<const CBlock> shared_pblock =
std::make_shared<const CBlock>(*pblock);
if (!ProcessNewBlock(Params(), shared_pblock, true, nullptr)) // <----
acquiring / release again inside
}
Doing it in a loop makes things to be slow down even more, what's idea
behind?
Also consider using of atomic global variable rather than acquiring mutex
again, no?
Did you interested in contribution in these approaches?
Regards
Antoniy Shumanov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20190130/ed88efe2/attachment-0001.html>
📝 Original message:Hi, bitcoin devs. I'm working at lbry.io and we stay closely to your core,
i want to discuss what you think about a contribution like:
base_blob and/or base_uint to be derived from std::array to be enabled move
semantics, as well on uint160, uint256, COutPoint.
Another approach that bother me is acquiring / releasing recursive mutex in
a loop, snippet from minig.cpp
while (nHeight < nHeightEnd && !ShutdownRequested())
{
std::unique_ptr<CBlockTemplate>
pblocktemplate(BlockAssembler(Params()).CreateNewBlock(coinbaseScript->reserveScript));
CBlock *pblock = &pblocktemplate->block;
{
LOCK(cs_main); // <--------- acquiring
IncrementExtraNonce(pblock, chainActive.Tip(), nExtraNonce);
} // <-------- release
std::shared_ptr<const CBlock> shared_pblock =
std::make_shared<const CBlock>(*pblock);
if (!ProcessNewBlock(Params(), shared_pblock, true, nullptr)) // <----
acquiring / release again inside
}
Doing it in a loop makes things to be slow down even more, what's idea
behind?
Also consider using of atomic global variable rather than acquiring mutex
again, no?
Did you interested in contribution in these approaches?
Regards
Antoniy Shumanov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20190130/ed88efe2/attachment-0001.html>