Branch: refs/heads/master
Home: https://github.com/conformal/btcd
Commit: ec8d0e582ccbef46371238cb5b5f1e4622b657f8
https://github.com/conformal/btcd/commit/ec8d0e582ccbef46371238cb5b5f1e4622b657f8
Author: Owain G. Ainsworth <[email protected]>
Date: 2014-04-23 (Wed, 23 Apr 2014)
Changed paths:
M addrmanager.go
Log Message:
-----------
Attempt to create less garbage for getaddr calls.
We make ka.na immutable in the address manager. Whenever we would update
the structure we replace it with a new copy. This beats making a copy of
all addresses once per getaddr command (max is just over 23000 we would
be copying, compared to at most 2000 copies on a new getaddr that has
all addresses we know with newer dates).
Commit: 88ea84cf12bb6a16e8307cb49252e95dfc77cc4d
https://github.com/conformal/btcd/commit/88ea84cf12bb6a16e8307cb49252e95dfc77cc4d
Author: Owain G. Ainsworth <[email protected]>
Date: 2014-04-23 (Wed, 23 Apr 2014)
Changed paths:
M addrmanager.go
Log Message:
-----------
Addrman: only shuffle as much as we need.
If we switch the knuth shuffle to the version that swaps the element
with an element between it and the end of the array, then once we have
gotten to the amount of elements we need they won't change later in the
algorithm. Terminating here means that we only do 23% of the length of
the array worth of random swaps at most.
Commit: 4d44eeb877b4811b4952ccaf2bb5a2b4f654a3c3
https://github.com/conformal/btcd/commit/4d44eeb877b4811b4952ccaf2bb5a2b4f654a3c3
Author: Owain G. Ainsworth <[email protected]>
Date: 2014-04-23 (Wed, 23 Apr 2014)
Changed paths:
M peer.go
M server.go
Log Message:
-----------
Move to protecting all peer stats by the same mutex.
In practise the races caused by not protecting these quite simply didn't
matter, they couldn't actually cause any damage whatsoever. However, I
am sick of hearing about these essentially false positivies whenever
someone runs the race detector (yes, i know that race detector has no
false positives but this was effectively harmess).
verified to shut the detector up by dhill.
Compare: https://github.com/conformal/btcd/compare/08377c21e2c7...4d44eeb877b4