NAME

CBitcoin::Block

dl_load_flags

Nothing to see here.

---++ genesis_block

Return the genesis block that corresponds to the current $CBitcoin::network_bytes value.

---++ deserialize($payload)->object

{
         'tx' => [
                   {
                     'vout' => [
                                 {
                                   'value' => 5000000000,
                                   'script' => '.........'
                                 }
                               ],
                     'vin' => [
                                 {
                                   'prevIndex' => 4294967295,
                                   'scriptSig' => ',,,,The Times 03/Jan/2009 Chancellor on brink of second bailout for banks',
                                   'prevHash' => '0000000000000000000000000000000000000000000000000000000000000000'
                                 }
                               ]
                   }
                 ],
         'prevBlockHash' => '0000000000000000000000000000000000000000000000000000000000000000',
         'merkleRoot' => '4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b',
         'sha256' => '000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f',
         'nonce' => 2083236893,
         'time' => 1231006505,
         'bits' => 486604799,
         'version' => 1
       };

---+++ deserialize_filtered($payload,$bloomfilter)

Use this to deserialize blocks and get the transactions that are interesting by using Bloom filters.

Scripts and prevHashs must be serialized (binary).

---++ serialize_header

transaction count is set to 0.

---+ Getters/Setters

---++ height($newheight)

The spv assigns this number. The spv uses this block object as a convenient place to store chain information regarding the height and difficulty.

---++ cummulative_difficulty($newdifficulty)

Used by the spv to track which chain is the "Longest" (ie in terms of difficulty)

---++ tx_by_hash($blockhash)

Given a hash (in hex form or binary), retrieve the corresponding transaction.

1 POD Error

The following errors were encountered while parsing the POD:

Around line 62:

'=item' outside of any '=over'

=over without closing =back