rest/rpc: Make mempoolinfo atomic #15474

pull promag wants to merge 1 commits into bitcoin:master from promag:2019-02-atomic-mempoolinfo changing 1 files +2 −0
  1. promag commented at 3:14 pm on February 25, 2019: member
    Make /rest/mempool/info.json endpoint and getmempoolinfo RPC atomic.
  2. geekastute commented at 4:20 pm on February 25, 2019: none
    sounds good but need to review more thoroughly
  3. fanquake added the label RPC/REST/ZMQ on Feb 25, 2019
  4. MarcoFalke commented at 10:49 pm on March 3, 2019: member
    So what is the point of locking in the public mempool calls in the first place? If there is no reason, I’d rather remove those locks and pass the responsibility (and flexibility) to lock to the caller.
  5. promag commented at 10:58 pm on March 3, 2019: member
    @MarcoFalke I was going that way but the change started to get big. Since it’s a recursive mutex (for now) this is also correct. But I agree with you that some should just require the lock.
  6. in src/rpc/blockchain.cpp:1488 in 051ebac2e2 outdated
    1486@@ -1487,6 +1487,7 @@ static UniValue getchaintips(const JSONRPCRequest& request)
    1487 
    1488 UniValue mempoolInfoToJSON()
    


    MarcoFalke commented at 10:01 pm on March 6, 2019:
    Needs rebase

    promag commented at 3:44 pm on March 8, 2019:
    Done.
  7. promag force-pushed on Mar 8, 2019
  8. rest/rpc: Make mempoolinfo atomic e377846ff1
  9. in src/rpc/blockchain.cpp:1486 in 87a60ebba8 outdated
    1482@@ -1483,6 +1483,7 @@ static UniValue getchaintips(const JSONRPCRequest& request)
    1483 
    1484 UniValue MempoolInfoToJSON(const CTxMemPool& pool)
    1485 {
    1486+    LOCK(::mempool.cs);
    


    MarcoFalke commented at 4:09 pm on March 8, 2019:
    0    LOCK(pool.cs);
    

    promag commented at 4:16 pm on March 8, 2019:
    Duh ofc, thanks!
  10. promag force-pushed on Mar 8, 2019
  11. MarcoFalke merged this on Apr 17, 2019
  12. MarcoFalke closed this on Apr 17, 2019

  13. MarcoFalke referenced this in commit e2b5fdee00 on Apr 17, 2019
  14. promag deleted the branch on Apr 17, 2019
  15. jasonbcox referenced this in commit 2e33b69474 on Nov 12, 2020
  16. PastaPastaPasta referenced this in commit 8364826ca1 on Jun 27, 2021
  17. PastaPastaPasta referenced this in commit 9c31de7d74 on Jun 28, 2021
  18. PastaPastaPasta referenced this in commit 3e94368ae6 on Jun 29, 2021
  19. PastaPastaPasta referenced this in commit fcd53b0d02 on Sep 11, 2021
  20. kittywhiskers referenced this in commit 2c5b2148b2 on Nov 3, 2021
  21. kittywhiskers referenced this in commit 68c05dbf06 on Nov 4, 2021
  22. kittywhiskers referenced this in commit 7ae2e66612 on Nov 11, 2021
  23. PastaPastaPasta referenced this in commit ee34678d94 on Nov 12, 2021
  24. pravblockc referenced this in commit 9fdb925dff on Nov 18, 2021
  25. DrahtBot locked this on Dec 16, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-09-29 04:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me