Skip to content

Commit

Permalink
Rename getAccountsPure to _getAccountsPure.
Browse files Browse the repository at this point in the history
  • Loading branch information
danjm committed Oct 31, 2018
1 parent 9b2261f commit 29dcda5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lib/stateManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ proto.getAccount = function (address, cb) {
this.cache.getOrLoad(address, cb)
}

proto.getAccountPure = function (address, cb) {
proto._getAccountPure = function (address, cb) {
const self = this
const cachedAccount = this.cache.get(address)

Expand Down Expand Up @@ -308,7 +308,7 @@ proto.accountIsEmpty = function (address, getAccountWithoutLoad, cb) {
}

var self = this
var getAccountCall = getAccountWithoutLoad ? self.getAccountPure : self.getAccount
var getAccountCall = getAccountWithoutLoad ? self._getAccountPure : self.getAccount

getAccountCall.bind(this)(address, function (err, account) {
if (err) {
Expand Down
6 changes: 3 additions & 3 deletions tests/api/stateManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const util = require('ethereumjs-util')
const StateManager = require('../../lib/stateManager')
const { createAccount } = require('./utils')

tape.only('StateManager', (t) => {
tape('StateManager', (t) => {
t.test('should instantiate', (st) => {
const stateManager = new StateManager()

Expand Down Expand Up @@ -53,15 +53,15 @@ tape.only('StateManager', (t) => {
account
)

let res = await promisify(stateManager.getAccountPure.bind(stateManager))(
let res = await promisify(stateManager._getAccountPure.bind(stateManager))(
'a94f5374fce5edbc8e2a8697c15331677e6ebf0b'
)

st.equal(res.balance.toString('hex'), 'fff384')

stateManager.cache.clear()

res = await promisify(stateManager.getAccountPure.bind(stateManager))(
res = await promisify(stateManager._getAccountPure.bind(stateManager))(
'a94f5374fce5edbc8e2a8697c15331677e6ebf0b'
)

Expand Down

0 comments on commit 29dcda5

Please sign in to comment.