mirror of
https://github.com/FlipsideCrypto/dcrd.git
synced 2026-02-06 10:56:47 +00:00
Contains the following upstream commits: -00bddf7540-250228c32f-f1bd2f8d6e-cbbe3a8bbe-aa03d68e1eIn addition to the normal required changes for syncing, the following changes have been made in order to facilitate integration of the new package into Decred: - Removed check in PushRejectMsg against protocol version since all peers since the initial version support it - Fixed leaked timer in `syncMiningStateAfterSync` function - Add the Decred-specific OnGetMiningState and OnMiningState handlers to the new peer package - Add handler for the new mining state messages to the 'serverPeer' type and register them - Use the new constant for wire.InitialProtocolVersion in the reject message instead of hard coded number - Remove logic specific to the regression network since Decred does not have it
20 lines
664 B
Go
20 lines
664 B
Go
// Copyright (c) 2015 The btcsuite developers
|
|
// Copyright (c) 2016 The Decred developers
|
|
// Use of this source code is governed by an ISC
|
|
// license that can be found in the LICENSE file.
|
|
|
|
/*
|
|
This test file is part of the peer package rather than than the peer_test
|
|
package so it can bridge access to the internals to properly test cases which
|
|
are either not possible or can't reliably be tested via the public interface.
|
|
The functions are only exported while the tests are being run.
|
|
*/
|
|
|
|
package peer
|
|
|
|
// TstAllowSelfConns allows the test package to allow self connections by
|
|
// disabling the detection logic.
|
|
func TstAllowSelfConns() {
|
|
allowSelfConns = true
|
|
}
|