Improve prioritisetransaction test coverage #12079

pull promag wants to merge 1 commits into bitcoin:master from promag:2018-01-prioritisetransaction changing 1 files +19 −0
  1. promag commented at 1:50 AM on January 3, 2018: member

    No description provided.

  2. fanquake added the label Tests on Jan 3, 2018
  3. MarcoFalke commented at 12:25 PM on January 3, 2018: member
    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA512
    
    utACK 416826cd1c9c7edfe2eb77b70e0d38313a8a57aa
    -----BEGIN PGP SIGNATURE-----
    
    iQIcBAEBCgAGBQJaTMuiAAoJENLqSFDnUoslBEUQAINrbUNb/HR/Jif3TuGxhu0h
    RKY+p/M3sRPNIHgcPPK7wjLc7wdJ128hcLIAzNca9R76XXtUoFz5i6/kaA/Dno3g
    9jRyTsj6Y17FSTDO24gO8xUkkuieX4BvRAmOxGciQY4Yl8Bz8SzjZ+9Tide3d2ky
    Yixt7dI3+nniy5rShey33iKdUzmTPO1LPiM0cW2dYIDEtGXGH0e5yUPXT2XhVkHr
    +sRD9OU3egQRrquz5lvXEcjZBUZJ0aPxxTddW4netzRfADV3nqxd05/r1lwu3zw/
    ianUdl5rqMkWxYq42+yCiw2qNxH+KcbLB71hncJaIt/atryNMTdEjF6qUw3Hnb66
    DJHS/SZT/a/CpONM1IcHcabQZJsfe+RsdcDODfTsGYDsdkERlsh1Ri/96Bs0dFOw
    WNcCrbLXTwY2Qdp+OG8MkMxhsbt4B70FEplDShxxVjEPeMr8mXIpHhmeSK1ptl08
    h2S/c6Y0Mv/YvgqoxSI+D3ZTmdGTwyESqF49o3lExl+fM+QeR5+xLcFuvHqgIYsm
    UPflAajI/660MbCN7h8scvez6tOeTcnTPtJZxPv65OlmS3a7gzLiggoJ1Q9n+V6I
    B4GmNA0tb94p2NDr4YNm+qVe8PRxy12R58CZwsKb5GmdM3bqbdRZ8Q6UwM3Etmml
    yZqdWJa5nI0uqvcL5i7D
    =3ZD6
    -----END PGP SIGNATURE-----
    
  4. in src/rpc/mining.cpp:252 in 021907bf0e outdated
     248 | @@ -249,8 +249,6 @@ UniValue prioritisetransaction(const JSONRPCRequest& request)
     249 |              + HelpExampleRpc("prioritisetransaction", "\"txid\", 0.0, 10000")
     250 |          );
     251 |  
     252 | -    LOCK(cs_main);
    


    sdaftuar commented at 7:49 PM on January 4, 2018:

    Why is this being removed? It's not obvious to me that this wouldn't result in some kind of race with AcceptToMemoryPool.

    Generally I think of cs_main as required to make any changes to the mempool, while mempool.cs is sufficient for read-only access to the mempool... PrioritiseTransaction changes the mempool (re-sorting it), though I guess doesn't add or remove anything -- so it's not clear to me whether this would be problematic or not, with our current code. But it seems safer to me to not remove the lock here, because even if there's no race condition now, it seems like it could result in a future bug.


    promag commented at 8:09 PM on January 4, 2018:

    Yes I can remove that commit, it's not entirely related to this PR. I guess it can be revisited later after annotations are in place.


    promag commented at 3:35 PM on January 5, 2018:

    Done.


    MarcoFalke commented at 4:37 PM on January 5, 2018:

    I'd prefer if we document such assumptions in the code. Preferably with a clang static annotation but maybe also with a short description about the locking requirements for that method/class, if needed.

  5. [qa] Improve prioritisetransaction functional test 7f67dd0aa6
  6. promag force-pushed on Jan 5, 2018
  7. sdaftuar commented at 4:04 PM on January 5, 2018: member

    utACK

  8. sipa commented at 10:36 AM on January 6, 2018: member

    utACK 7f67dd0aa67ec030d5793dcc69594173d5b69fcc

  9. MarcoFalke merged this on Jan 6, 2018
  10. MarcoFalke closed this on Jan 6, 2018

  11. MarcoFalke referenced this in commit 45173fa6fc on Jan 6, 2018
  12. PastaPastaPasta referenced this in commit 648708ab48 on Feb 13, 2020
  13. deadalnix referenced this in commit 925cb24b97 on Feb 15, 2020
  14. PastaPastaPasta referenced this in commit e6c3b69693 on Feb 27, 2020
  15. PastaPastaPasta referenced this in commit 5325484fd3 on Feb 27, 2020
  16. PastaPastaPasta referenced this in commit c02a1239b7 on Feb 27, 2020
  17. ckti referenced this in commit 1701cb4d1d on Mar 28, 2021
  18. DrahtBot locked this on Sep 8, 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: 2026-04-22 00:15 UTC

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