Skip to content

Commit 2ee4b3e

Browse files
authored
Update Certificate::tl to handle default flags
1 parent c5639ab commit 2ee4b3e

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

overlay/overlay-manager.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -598,8 +598,12 @@ BroadcastCheckResult Certificate::check(PublicKeyHash node, OverlayIdShort overl
598598
}
599599

600600
tl_object_ptr<ton_api::overlay_Certificate> Certificate::tl() const {
601-
return create_tl_object<ton_api::overlay_certificate>(issued_by_.get<PublicKey>().tl(), expire_at_, max_size_,
602-
signature_.clone_as_buffer_slice());
601+
if (flags_ == cert_default_flags(max_size_)) {
602+
return create_tl_object<ton_api::overlay_certificate>(issued_by_.get<PublicKey>().tl(), expire_at_, max_size_,
603+
signature_.clone_as_buffer_slice());
604+
}
605+
return create_tl_object<ton_api::overlay_certificateV2>(issued_by_.get<PublicKey>().tl(), expire_at_, max_size_, flags_,
606+
signature_.clone_as_buffer_slice());
603607
}
604608

605609
tl_object_ptr<ton_api::overlay_Certificate> Certificate::empty_tl() {

0 commit comments

Comments
 (0)