Skip to content

Commit

Permalink
Some more stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
axic committed Oct 31, 2016
1 parent b3d7ee6 commit 22f8d4d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/opFns.js
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ module.exports = {
},
SLOAD: function (key, runState, cb) {
var stateManager = runState.stateManager
key = key.toBuffer('be', 32)
key = utils.pad(key.toBuffer('be', 32), 32)

stateManager.getContractStorage(runState.address, key, function (err, value) {
if (err) return cb(err)
Expand All @@ -330,8 +330,8 @@ module.exports = {
SSTORE: function (key, val, runState, cb) {
var stateManager = runState.stateManager
var address = runState.address
key = utils.setLengthLeft(key, 32)
var value = utils.unpad(val)
key = utils.setLengthLeft(key.toBuffer('be', 32), 32)
var value = val.toBuffer('be', 32)

stateManager.getContractStorage(runState.address, key, function (err, found) {
if (err) return cb(err)
Expand Down

0 comments on commit 22f8d4d

Please sign in to comment.