File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -115,9 +115,6 @@ jobs:
115115 command : npm run test:reputation:2:anotherChain
116116 environment :
117117 NODE_OPTIONS : --max-old-space-size=6144
118- - run :
119- name : " Running storage consistency smoke tests"
120- command : npm run test:contracts:smoke
121118
122119 lint-and-unit-test :
123120 << : *job_common
Original file line number Diff line number Diff line change @@ -131,9 +131,26 @@ exports.web3GetChainId = async function web3GetChainId() {
131131} ;
132132
133133exports . getChainId = async function getChainId ( ) {
134- const c = await ChainId . new ( ) ;
135- const chainId = await c . getChainId ( ) ;
136- return chainId . toNumber ( ) ;
134+ // Why do we do this? Because with the check-if-we-are-on-the-minign chain setup for
135+ // tests, we've introduced a new transaction in the setup process. This causes the
136+ // past-version-caching to fail, because we end up deploying different code to the same
137+ // addresses. This is a workaround for that, but should be considered temporary.
138+ const packet = {
139+ jsonrpc : "2.0" ,
140+ method : "eth_accounts" ,
141+ params : [ ] ,
142+ id : new Date ( ) . getTime ( ) ,
143+ } ;
144+
145+ return new Promise ( ( resolve , reject ) => {
146+ ChainId . currentProvider . send ( packet , async function ( err , res ) {
147+ if ( err !== null ) return reject ( err ) ;
148+ const accounts = res . result ;
149+ const c = await ChainId . new ( { from : accounts . slice ( - 1 ) [ 0 ] } ) ;
150+ const chainId = await c . getChainId ( ) ;
151+ return resolve ( chainId . toNumber ( ) ) ;
152+ } ) ;
153+ } ) ;
137154} ;
138155
139156exports . web3SignTypedData = function web3SignTypedData ( address , typedData ) {
Original file line number Diff line number Diff line change @@ -155,11 +155,11 @@ contract("Contract Storage", (accounts) => {
155155 console . log ( "miningCycleStateHash:" , miningCycleStateHash ) ;
156156 console . log ( "tokenLockingStateHash:" , tokenLockingStateHash ) ;
157157
158- expect ( colonyNetworkStateHash ) . to . equal ( "0x1d26c373bb7fe7e827c4a92a2a965d1c5923b5d2718768a2e39c28bd55ced13d " ) ;
159- expect ( colonyStateHash ) . to . equal ( "0xe175ac9e4a1e359019398762e64148855d400b5e2c2a38c1d5e39f655b6e70d3 " ) ;
160- expect ( metaColonyStateHash ) . to . equal ( "0x95885ff0152bd32edc446ef70b58ae2753b1b4570f37baea5ff2f5252d8415e9 " ) ;
161- expect ( miningCycleStateHash ) . to . equal ( "0x1f153201d925b23bd889610791fa2c57636f0d07462527cfeff28fb9da6f7cf1 " ) ;
162- expect ( tokenLockingStateHash ) . to . equal ( "0xa770cfecfe522e5c151a5a0038ac02ff04945a56491724af70d34c200b09a108 " ) ;
158+ expect ( colonyNetworkStateHash ) . to . equal ( "0x66b279547b6eab5c688ac6b6a6bd7dedc0849a9e9d2218e5a1dcf0eeac8847f8 " ) ;
159+ expect ( colonyStateHash ) . to . equal ( "0x156061470e5ed4c0f091adb726dbb819692d23bc8338bd06a660a9a4cc48eea6 " ) ;
160+ expect ( metaColonyStateHash ) . to . equal ( "0x4c2b0dba6abe7feee2c052e3a5f07ccb71adb5d0bd5c32d21b16559b313ecf82 " ) ;
161+ expect ( miningCycleStateHash ) . to . equal ( "0x179caec9074f4db8b06afcb6dad20c8091b31d7b483bd1c6cb469d79d1bc3649 " ) ;
162+ expect ( tokenLockingStateHash ) . to . equal ( "0xd128da36044b6c399c522f379a78591a572394423814b8aeb511cf2a3a07701f " ) ;
163163 } ) ;
164164 } ) ;
165165} ) ;
You can’t perform that action at this time.
0 commit comments