mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-19 19:29:45 +02:00
Merge bitcoin/bitcoin#28176: tests: add coverage to feature_addrman.py
380130d9d7test: add coverage to feature_addrman.py (kevkevin) Pull request description: I added two new tests that will cover the nNew and nTried tests which add coverage to the if block by checking values larger than our range since we only check for negative values now adding coverage to these lines https://github.com/bitcoin/bitcoin/blob/master/src/addrman.cpp#L273 https://github.com/bitcoin/bitcoin/blob/master/src/addrman.cpp#L280 our test seem to only cover the `nTried < 0` and `nNew < 0` scenarios ACKs for top commit: ismaelsadeeq: ACK380130d9d7, code looks good to me 🍃 . 0xB10C: Re-ACK380130d9d7Tree-SHA512: a063bd9ca4d2d536a27c8c22a28fb13759a96f19cd8ba6cb8879cf7f65046d4ff6e8f70df17feaffd0d0d08ef914cb18a11258d313a4841c811a7e7ae4df6d5b
This commit is contained in:
@@ -25,6 +25,11 @@ import os
|
||||
STATE_LISTEN = '0A'
|
||||
# STATE_CLOSING = '0B'
|
||||
|
||||
# Address manager size constants as defined in addrman_impl.h
|
||||
ADDRMAN_NEW_BUCKET_COUNT = 1 << 10
|
||||
ADDRMAN_TRIED_BUCKET_COUNT = 1 << 8
|
||||
ADDRMAN_BUCKET_SIZE = 1 << 6
|
||||
|
||||
def get_socket_inodes(pid):
|
||||
'''
|
||||
Get list of socket inodes for process pid.
|
||||
|
||||
Reference in New Issue
Block a user