function checkResults (cb) {
  // fetch the new account from the trie.
  stateTrie.get(createdAddress, function (err, val) {
    var account = new Account(val)

    storageRoot = account.stateRoot // used later! :)
    console.log('------results------')
    console.log('nonce: ' + account.nonce.toString('hex'))
    console.log('balance in wei: ' + account.balance.toString('hex'))
    console.log('stateRoot: ' + storageRoot.toString('hex'))
    console.log('codeHash:' + account.codeHash.toString('hex'))
    console.log('-------------------')
    cb(err)
  })
}
function checkResults (cb) {
  
  stateTrie.get(createdAddress, function (err, val) {
    var account = new Account(val)

    storageRoot = account.stateRoot 
    console.log('------results------')
    console.log('nonce: ' + account.nonce.toString('hex'))
    console.log('balance in wei: ' + account.balance.toString('hex'))
    console.log('stateRoot: ' + storageRoot.toString('hex'))
    console.log('codeHash:' + account.codeHash.toString('hex'))
    console.log('-------------------')
    cb(err)
  })
}
function checkResults ( cb ) { // fetch the new account from the trie. stateTrie . get ( createdAddress , function ( err , val ) { var account = new Account ( val ) storageRoot = account . stateRoot // used later! :) console . log ( '------results------' ) console . log ( 'nonce: ' + account . nonce . toString ( 'hex' ) ) console . log ( 'balance in wei: ' + account . balance . toString ( 'hex' ) ) console . log ( 'stateRoot: ' + storageRoot . toString ( 'hex' ) ) console . log ( 'codeHash:' + account . codeHash . toString ( 'hex' ) ) console . log ( '-------------------' ) cb ( err ) } ) }
Now lets look at what we created. The transaction should have created a new account for the contranct in the trie.Lets test to see if it did.
Now lets look at what we created . The transaction should have created a new account for the contranct in the trie . Lets test to see if it did .