Skip to content

Commit

Permalink
Update dogecoin verify docs for sendTransaction.
Browse files Browse the repository at this point in the history
  • Loading branch information
dm4 committed Jul 16, 2018
1 parent bf0ecff commit 3aff33f
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions docs/verify-dogecoin-block-on-travis.rst
Original file line number Diff line number Diff line change
Expand Up @@ -242,3 +242,40 @@ and check the correctness of PoW result. The funcntion will return :code:`true`
# Even 1-bit of nonce changed, this block header will become invalid
> c.verifyBlock.call(1, "82bc68038f6034c0596b6e313729793a887fded6e92a31fbdf70863f89d9bea2", "3b14b76d22a3f2859d73316002bc1b9bfc7f37e2c3393be9b722b62bbd786983", 1386474933, "1e0ffff0", 3404207871)
false
# You could also use sendTransaction to verifyBlock function
> t = c.verifyBlock.sendTransaction(2, "12aca0938fe1fb786c9e0e4375900e8333123de75e240abd3337d1b411d14ebe", "31757c266102d1bee62ef2ff8438663107d64bdd5d9d9173421ec25fb2a814de", 1392346781, "1b267eeb", 2216773632, {from:web3.cmt.accounts[0], gas: 1000000});
# We set the gas limit to 1000000 and verifyBlock function only costs 243583 gas
> cmt.getTransaction(t)
{
blockHash: "0x46fc1763dd3c761e84c6f0a6eb430333c0eb8b3b33d8d2d6098d48b3b7662459",
blockNumber: 39,
from: "0x7eff122b94897ea5b0e2a9abf47b86337fafebdc",
gas: 1000000,
gasPrice: 2000000000,
hash: "0xa401b964930848e44af24a31338a58ca1f75e32a0abbb0f978ad3c519595e04a",
input: "0xa83dc306000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000052fd869d0000000000000000000000000000000000000000000000000000000000000180000000000000000000000000000000000000000000000000000000008421480000000000000000000000000000000000000000000000000000000000000000403132616361303933386665316662373836633965306534333735393030653833333331323364653735653234306162643333333764316234313164313465626500000000000000000000000000000000000000000000000000000000000000403331373537633236363130326431626565363265663266663834333836363331303764363462646435643964393137333432316563323566623261383134646500000000000000000000000000000000000000000000000000000000000000083162323637656562000000000000000000000000000000000000000000000000",
nonce: 1,
r: "0x62d1d11973bfd94f05daa86708806d23cadbb1f33b6d7b5cc1e2bec90d50907",
s: "0x26df72607d09561de0d2507a8d5789676ddc4ce93ee3ac67f976ee64a61911c5",
to: "0xb6b29ef90120bec597939e0eda6b8a9164f75deb",
transactionIndex: 0,
v: "0x4a",
value: 0
}
> cmt.getTransactionReceipt(t)
{
blockHash: "0x46fc1763dd3c761e84c6f0a6eb430333c0eb8b3b33d8d2d6098d48b3b7662459",
blockNumber: 39,
contractAddress: null,
cumulativeGasUsed: 243583,
from: "0x7eff122b94897ea5b0e2a9abf47b86337fafebdc",
gasUsed: 243583,
logs: [],
logsBloom: "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
root: "0xaa9759a788044dbad69ae99e521c1c5969e0b4e52e17284313ce367f3df48f9e",
to: "0xb6b29ef90120bec597939e0eda6b8a9164f75deb",
transactionHash: "0xa401b964930848e44af24a31338a58ca1f75e32a0abbb0f978ad3c519595e04a",
transactionIndex: 0
}

0 comments on commit 3aff33f

Please sign in to comment.