Skip to content

Commit ff1c2ef

Browse files
committed
Minor cleanup
1 parent 377af9d commit ff1c2ef

File tree

5 files changed

+9
-6
lines changed

5 files changed

+9
-6
lines changed

build-tools/block-data-plots/collect_data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def collect_data(args):
2828
"--output-file", output_file,
2929
"--mainchain-only=true",
3030
"--fields=height,timestamp,target",
31-
"--from_height=0"
31+
"--from-height=0"
3232
]
3333

3434
if args.node_data_dir is not None:

build-tools/fork-detection/detector.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,9 @@ def main():
551551
default=None)
552552
args = parser.parse_args()
553553

554-
email_sender = EmailSender(args.notification_email, args.notification_email_from)
554+
email_sender = EmailSender(
555+
args.chain_type, args.notification_email, args.notification_email_from
556+
)
555557

556558
try:
557559
Handler(args, email_sender).run()

build-tools/fork-detection/utils.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -414,15 +414,16 @@ def show_cursor():
414414
class EmailSender:
415415
# to_addr - the address to send emails to; if None, nothing will be sent.
416416
# from_addr - the 'from' address for the emails; if None, to_addr will be used.
417-
def __init__(self, to_addr: str | None, from_addr: str | None):
417+
def __init__(self, chain_type: str, to_addr: str | None, from_addr: str | None):
418+
self.chain_type = chain_type
418419
self.to_addr = to_addr
419420
self.from_addr = from_addr or to_addr
420421

421422
def send(self, msg_subj, msg_body):
422423
if self.to_addr is not None:
423424
msg = MIMEText(msg_body)
424425
msg["Subject"] = msg_subj
425-
msg["From"] = f"Fork detection script at {platform.node()} <{self.from_addr}>"
426+
msg["From"] = f"Fork detection script at {platform.node()} ({self.chain_type}) <{self.from_addr}>"
426427
msg["To"] = self.to_addr
427428

428429
s = smtplib.SMTP('localhost')

chainstate/db-dumper/src/dumper/options.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ pub struct Options {
6969
pub mainchain_only: bool,
7070

7171
/// Block height to start from
72-
#[clap(long = "from_height", default_value_t = 0)]
72+
#[clap(long = "from-height", default_value_t = 0)]
7373
pub from_height: u64,
7474

7575
/// This help string

chainstate/src/detail/error.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ pub enum CheckBlockError {
168168
#[error("CRITICAL: Failed to retrieve ancestor of submitted block: {0}")]
169169
GetAncestorError(#[from] GetAncestorError),
170170
#[error(
171-
"Attempted to add a block before reorg limit (attempted at height: {} while current height is: {} and min allowed is: {})",
171+
"Attempted to add a block before reorg limit (common ancestor height is: {} while current tip height is: {} and min allowed is: {})",
172172
common_ancestor_height,
173173
tip_block_height,
174174
min_allowed_height

0 commit comments

Comments
 (0)