14
14
// You should have received a copy of the GNU General Public License
15
15
// along with this program. If not, see <http://www.gnu.org/licenses/>.
16
16
17
- use std:: collections:: VecDeque ;
17
+ use std:: collections:: { HashMap , VecDeque } ;
18
18
use std:: io:: { Read , Write } ;
19
19
use std:: ops:: { Deref , DerefMut } ;
20
20
use std:: sync:: mpsc:: {
@@ -24,7 +24,7 @@ use std::time::Duration;
24
24
use std:: { io, net} ;
25
25
26
26
use clarity:: vm:: costs:: ExecutionCost ;
27
- use clarity:: vm:: types:: BOUND_VALUE_SERIALIZATION_HEX ;
27
+ use clarity:: vm:: types:: { QualifiedContractIdentifier , BOUND_VALUE_SERIALIZATION_HEX } ;
28
28
use stacks_common:: codec:: { StacksMessageCodec , MAX_MESSAGE_LEN } ;
29
29
use stacks_common:: types:: net:: PeerAddress ;
30
30
use stacks_common:: util:: hash:: to_hex;
@@ -44,7 +44,8 @@ use crate::net::neighbors::{
44
44
WALK_SEED_PROBABILITY , WALK_STATE_TIMEOUT ,
45
45
} ;
46
46
use crate :: net:: {
47
- Error as net_error, MessageSequence , Preamble , ProtocolFamily , RelayData , StacksHttp , StacksP2P ,
47
+ Error as net_error, MessageSequence , NeighborAddress , Preamble , ProtocolFamily , RelayData ,
48
+ StacksHttp , StacksP2P ,
48
49
} ;
49
50
50
51
/// Receiver notification handle.
@@ -433,6 +434,8 @@ pub struct ConnectionOptions {
433
434
pub nakamoto_unconfirmed_downloader_interval_ms : u128 ,
434
435
/// The authorization token to enable privileged RPC endpoints
435
436
pub auth_token : Option < String > ,
437
+ /// StackerDB replicas to talk to for a particular smart contract
438
+ pub stackerdb_hint_replicas : HashMap < QualifiedContractIdentifier , Vec < NeighborAddress > > ,
436
439
437
440
// fault injection
438
441
/// Disable neighbor walk and discovery
@@ -565,6 +568,7 @@ impl std::default::Default for ConnectionOptions {
565
568
nakamoto_inv_sync_burst_interval_ms : 1_000 , // wait 1 second after a sortition before running inventory sync
566
569
nakamoto_unconfirmed_downloader_interval_ms : 5_000 , // run unconfirmed downloader once every 5 seconds
567
570
auth_token : None ,
571
+ stackerdb_hint_replicas : HashMap :: new ( ) ,
568
572
569
573
// no faults on by default
570
574
disable_neighbor_walk : false ,
0 commit comments