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.

38 lines
711 B

  1. #!/usr/bin/perl
  2. #
  3. # Intent:
  4. # testing it !
  5. #
  6. # Note:
  7. # This work has been done during my time at Doctor I·T
  8. #
  9. # -- Copyright drit, 2021 --
  10. #
  11. BEGIN { if (-e $ENV{SITE}.'/lib') { use lib $ENV{SITE}.'/lib'; } }
  12. #use if -e $LIB, $LIB.'/seed';
  13. use seed qw(rand64);
  14. use toychain qw(blockHash displayBlock);
  15. use YAML::Syck qw(Dump);
  16. print "// testing blockaddr\n";
  17. printf "chain.addr: %s\n",$toychain::chain->{bkaddr};
  18. # f96885aa : 21.4min
  19. # 044ce1de : 20.5min
  20. if (0) {
  21. &seed::setseed(0x21683774);
  22. my $n0 = rand64(); # n < 18446744073709551616
  23. printf "n0:%s\n",$n0;
  24. }
  25. displayBlock($toychain::genesis);
  26. my $addr = &blockHash($toychain::genesis);
  27. printf "genesis.addr: %s\n",$addr;
  28. print ".\n";
  29. exit $?;
  30. 1;