mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
Add overlay certificate checks
This commit is contained in:
parent
9e9351903a
commit
678a8a6a13
17 changed files with 232 additions and 62 deletions
|
@ -54,7 +54,16 @@ td::Status OverlayFecBroadcastPart::check_duplicate() {
|
|||
}
|
||||
|
||||
td::Status OverlayFecBroadcastPart::check_source() {
|
||||
TRY_STATUS(overlay_->check_source_eligible(source_, cert_.get(), broadcast_size_));
|
||||
auto r = overlay_->check_source_eligible(source_, cert_.get(), broadcast_size_, true);
|
||||
if (r == BroadcastCheckResult::Forbidden) {
|
||||
return td::Status::Error(ErrorCode::error, "broadcast is forbidden");
|
||||
}
|
||||
|
||||
// FIXME
|
||||
if (r == BroadcastCheckResult::NeedCheck) {
|
||||
return td::Status::Error(ErrorCode::error, "broadcast is forbidden");
|
||||
}
|
||||
|
||||
if (bcast_) {
|
||||
TRY_STATUS(bcast_->is_eligible_sender(source_));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue