diff --git a/RNS/Transport.py b/RNS/Transport.py index ff34198d..22febf1c 100755 --- a/RNS/Transport.py +++ b/RNS/Transport.py @@ -3777,16 +3777,17 @@ class Transport: link_destination = link_entry[IDX_LT_DSTHASH] link_traffic = link_entry[IDX_LT_TRXB] from_interface = link_entry[IDX_LT_RCVD_IF] + from_ifhash = from_interface.get_hash() entry = link_destinations.get(link_destination, None) if not entry: entry = { "active": 0, "pending": 0, - "traffic": 0, "from_ifs": set() } + "traffic": 0, "from_ifs": [] } link_destinations[link_destination] = entry entry["traffic"] += link_traffic - entry["from_ifs"].add(from_interface.get_hash()) + if not from_ifhash in entry["from_ifs"]: entry["from_ifs"].append(from_ifhash) if active: entry["active"] += 1 else: entry["pending"] += 1 diff --git a/RNS/Utilities/rnpath.py b/RNS/Utilities/rnpath.py index dd734ea9..4406a6b9 100644 --- a/RNS/Utilities/rnpath.py +++ b/RNS/Utilities/rnpath.py @@ -512,7 +512,7 @@ def main(): parser.add_argument("-V", "--vias", action="store_true", help="show via transport IDs", default=False) parser.add_argument("-E", "--expiry", action="store_true", help="show path expiry times", default=False) parser.add_argument("-m", "--max", action="store", metavar="hops", type=int, help="maximum hops to filter path table by", default=None) - parser.add_argument("-M", "--min-value", action="store", metavar="hops", type=float, help="minimum value to filter path table by", default=None) + parser.add_argument("-M", "--min-value", action="store", metavar="value", type=float, help="minimum value to filter path table by", default=None) parser.add_argument("-r", "--rates", action="store_true", help="show announce rate info", default=False) parser.add_argument("-d", "--drop", action="store_true", help="remove the path to a destination", default=False) parser.add_argument("-D", "--drop-announces", action="store_true", help="drop all queued announces", default=False) @@ -524,12 +524,12 @@ def main(): parser.add_argument("-b", "--blackholed", action="store_true", help="list blackholed identities", default=False) parser.add_argument("-B", "--blackhole", action="store_true", help="blackhole identity", default=False) parser.add_argument("-U", "--unblackhole", action="store_true", help="unblackhole identity", default=False) - parser.add_argument( "--duration", action="store", type=float, help="duration of blackhole enforcement in hours", default=None) - parser.add_argument( "--reason", action="store", type=str, help="reason for blackholing identity", default=None) + parser.add_argument( "--duration", action="store", metavar="hours", type=float, help="duration of blackhole enforcement in hours", default=None) + parser.add_argument( "--reason", action="store", metavar="reason", type=str, help="reason for blackholing identity", default=None) parser.add_argument("-p", "--blackholed-list", action="store_true", help="view published blackhole list for remote transport instance", default=False) parser.add_argument("-j", "--json", action="store_true", help="output in JSON format", default=False) parser.add_argument("-A", "--analyze", action="store_true", help="Analyze tables", default=False) - parser.add_argument("--capture", action="store", metavar="hops", type=str, help="path to capture file for analyze mode", default=None) + parser.add_argument("--capture", action="store", metavar="path", type=str, help="path to capture file for analyze mode", default=None) parser.add_argument("destination", nargs="?", default=None, help="hexadecimal hash of the destination", type=str) parser.add_argument("list_filter", nargs="?", default=None, help="filter for remote blackhole list view", type=str) parser.add_argument('-v', '--verbose', action='count', default=0)