Skip to content

Commit

Permalink
Put traversal stats first for atomic alignment
Browse files Browse the repository at this point in the history
  • Loading branch information
anacrolix authored and boypt committed Jul 22, 2021
1 parent c821771 commit dc287d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion traversal.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ func (me TraversalStats) String() string {

// Prioritizes addrs to try by distance from target, disallowing repeat contacts.
type traversal struct {
stats TraversalStats
targetInfohash int160.T
triedAddrs *stm.Var // Settish of krpc.NodeAddr.String
nodesPendingContact *stm.Var // Settish of addrMaybeId sorted by distance from the target
Expand All @@ -37,7 +38,6 @@ type traversal struct {
query func(Addr) QueryResult
// A hook to a begin a query on the server, that expects to receive the number of writes back.
serverBeginQuery func(Addr, string, func() numWrites) stm.Operation
stats TraversalStats
}

func newTraversal(targetInfohash int160.T) traversal {
Expand Down

0 comments on commit dc287d7

Please sign in to comment.