Skip to content

Commit

Permalink
Update docs for Block
Browse files Browse the repository at this point in the history
  • Loading branch information
Braydon Fuller committed Jan 22, 2015
1 parent aea05bd commit fad20d1
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions docs/block.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,8 @@ var block = new Block(hexaEncodedBlock);
assert(block.validMerkleRoot());

// blocks have several properties
assert(block.magicnum);
assert(block.size);
assert(block.header); // an instance of block header, more info below
assert(block.txs); // an array of transactions, more info below
assert(block.transactions); // an array of transactions, more info below

```

Expand Down Expand Up @@ -52,8 +50,8 @@ For more information about the specific properties of a block header please visi
The set of transactions in a block is an array of instances of [Transaction](transaction.md) and can be explored by iterating on the block's `transactions` member.

```javascript
for (var i in block.txs) {
var transaction = block.txs[i];
for (var i in block.transactions) {
var transaction = block.transactions[i];
}
```

0 comments on commit fad20d1

Please sign in to comment.