public inbox for bitcoindev@googlegroups.com
 help / color / mirror / Atom feed
* [bitcoin-dev] Contribution
@ 2019-01-30 14:24 Antoniy Shumanov
  2019-01-30 16:29 ` Marco Falke
  0 siblings, 1 reply; 2+ messages in thread
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	[flat|nested] 2+ messages in thread

* Re: [bitcoin-dev] Contribution
  2019-01-30 14:24 [bitcoin-dev] Contribution Antoniy Shumanov
@ 2019-01-30 16:29 ` Marco Falke
  0 siblings, 0 replies; 2+ messages in thread
From: Marco Falke @ 2019-01-30 16:29 UTC (permalink / raw)
  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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-01-30 16:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-30 14:24 [bitcoin-dev] Contribution Antoniy Shumanov
2019-01-30 16:29 ` Marco Falke

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox