Browse Source

resolve too-long-mempool-chain rejects

main
ghost 12 months ago
parent
commit
fe928f8f87
  1. 3
      README.md
  2. 11
      kevacoin/put.php

3
README.md

@ -11,12 +11,13 @@ CLI util to operate with large objects in small blocks size @@ -11,12 +11,13 @@ CLI util to operate with large objects in small blocks size
export FS object to blockchain namespace
```
php kevacoin/put.php processor filename [length]
php kevacoin/put.php processor filename [length] [delay]
```
* `processor` - path to `kevacoin-cli`
* `filename` - file path to store in blockchain
* `length` - optional split size, 3072 bytes [max](https://kevacoin.org/faq.html)
* `delay` - optional seconds of parts sending delay to prevent `too-long-mempool-chain` reject, 60 by default
### get

11
kevacoin/put.php

@ -60,5 +60,16 @@ if (!empty($kevaNamespace->namespaceId)) @@ -60,5 +60,16 @@ if (!empty($kevaNamespace->namespaceId))
);
print_r($kevaPut);
$delay = isset($argv[4]) ? (int) $argv[4] : 60;
echo sprintf(
'%s/%s sent, waiting %s seconds...' . PHP_EOL,
$key + 1,
count($parts),
$delay
);
sleep($delay);
}
}
Loading…
Cancel
Save