File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -729,6 +729,7 @@ bool price::send( price *prices[], const unsigned n )
729
729
730
730
manager *mgr1 = nullptr ;
731
731
732
+ // Build an upd_price rpc request for every price
732
733
for ( unsigned i = 0 , j = 0 ; i < n; ++i ) {
733
734
price *const p = prices[ i ];
734
735
if ( PC_UNLIKELY ( ! p->init_ && ! p->init_publish () ) ) {
@@ -772,6 +773,8 @@ bool price::send( price *prices[], const unsigned n )
772
773
p->preq_ ->set_block_hash ( mgr->get_recent_block_hash () );
773
774
upds_.emplace_back ( p->preq_ );
774
775
776
+ // If the batch is full, or we have reached the end, send the upd_price requests in upds_.
777
+ // These correspond to the valid prices[j..i], inclusive.
775
778
if (
776
779
upds_.size () >= mgr->get_max_batch_size ()
777
780
|| ( upds_.size () && ( i + 1 ) == n )
@@ -823,7 +826,7 @@ bool price::send( price *prices[], const unsigned n )
823
826
p1->inc_sent ();
824
827
}
825
828
826
- j = i;
829
+ j = i + 1 ;
827
830
upds_.clear ();
828
831
}
829
832
}
You can’t perform that action at this time.
0 commit comments