Contribution

Contribution
2019-01-30 16:29 ` Marco Falke
  
From: Antoniy Shumanov @ 2019-01-30 14:24 UTC (permalink / raw)
  To: bitcoin-dev

[-- Attachment #1: Type: text/plain, Size: 1194 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 1598 bytes --]

 permalink raw reply	[|nested]
2019-01-30 14:24 [bitcoin-dev] Contribution Antoniy Shumanov

  
From: Marco Falke @ 2019-01-30 16:29 UTC ( / )
  To: Bitcoin Protocol Discussion

This mailing list is for the development of the Bitcoin protocol (see
https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev).
Code changes to Bitcoin Core can be discussed on
https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-core-dev or
preferably be submitted to https://github.com/bitcoin/bitcoin/
directly.

-- Marco