You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

43 lines
790 B

#!/usr/bin/perl
#
# Intent:
# testing it !
#
# Note:
# This work has been done during my time at Doctor I·T
#
# -- Copyright drit, 2021 --
#
BEGIN { if (-e $ENV{SITE}.'/lib') { use lib $ENV{SITE}.'/lib'; } }
#use if -e $LIB, $LIB.'/seed';
use seed qw(rand64);
use functions qw(displayBlock);
use toychain qw(blockHash);
use YAML::Syck qw(Dump);
print "// testing blockaddr\n";
printf "chain.hash %s\n",$toychain::chain->[-1];
printf "head.addr %s\n",$toychain::HEADs[0]->{bkaddr};
my $block0 = $toychain::HEADs[0];
# f96885aa : 21.4min
# 044ce1de : 20.5min
if (0) {
&seed::setseed(0x21683774);
my $n0 = rand64(); # n < 18446744073709551616
printf "n0:%s\n",$n0;
}
displayBlock($block0);
my $hash = &blockHash($block0);
printf "head.hash %s\n",$hash;
print ".\n";
exit $?;
1;