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.

28 lines
572 B

  1. #!/usr/bin/perl
  2. BEGIN { if (-e $ENV{SITE}.'/lib') { use lib $ENV{SITE}.'/lib'; } }
  3. use seed;
  4. use toychain;
  5. use TXPOOL qw(getTxMeta);
  6. use YAML::Syck qw(Dump);
  7. my $seed = &seed::setseed('beautiful toy chain');
  8. my $height = &getChainHeight();
  9. my $n = $height + 1;
  10. printf "height: %s\n",$height;
  11. my $txmeta = getTxMeta();
  12. my $payload = "testing $0";
  13. my $comment = "new block $n";
  14. my $block = &createBlock($seed,$payload,$txmeta,$comment);
  15. #printf "--- # block %s...\n",Dump($block);
  16. my $blk = &insertBlock($block);
  17. printf "--- # blk %s...\n",Dump($blk);
  18. exit $?;
  19. 1;