3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
|
}
::dns::cleanup $dnsQueryID
}
return $retval
}
# XXX:TODO: Which namespace should this go in ?
proc ::nano::node::_randomSortList {args} {
set list [lindex $args end]
set args [lrange $args 0 end-1]
set salt [expr {rand()}]
tailcall lsort {*}$args -command [list apply {{salt a b} {
if {$a eq $b} {
return 0
}
|
<
|
|
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
|
}
::dns::cleanup $dnsQueryID
}
return $retval
}
proc ::nano::internal::randomSortList {args} {
set list [lindex $args end]
set args [lrange $args 0 end-1]
set salt [expr {rand()}]
tailcall lsort {*}$args -command [list apply {{salt a b} {
if {$a eq $b} {
return 0
}
|
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
|
unset -nocomplain ::nano::node::_node_id_nonces($peerKey)
continue
}
lappend completePeers $peerKey
}
set retval [::nano::node::_randomSortList -unique $completePeers]
return $retval
}
proc ::nano::protocol::parse::keepalive {extensions messageData} {
set peers [list]
while {$messageData ne ""} {
|
|
|
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
|
unset -nocomplain ::nano::node::_node_id_nonces($peerKey)
continue
}
lappend completePeers $peerKey
}
set retval [::nano::internal::randomSortList -unique $completePeers]
return $retval
}
proc ::nano::protocol::parse::keepalive {extensions messageData} {
set peers [list]
while {$messageData ne ""} {
|