Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/deniallugo-cludg-to-insert-batch…
Browse files Browse the repository at this point in the history
…' into dev
  • Loading branch information
dvush committed Jul 14, 2021
2 parents 04519a7 + 788768f commit 5e53d57
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
1 change: 0 additions & 1 deletion contracts/scripts/submit-regenesis-upgrade.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ async function startPreparation(upgradeGatekeeper: Contract) {
async function finishUpgrade(upgradeGatekeeper: Contract, lastBlockInfo: string) {
const blockInfo = JSON.parse(lastBlockInfo);
const upgradeData = ethers.utils.defaultAbiCoder.encode([storedBlockInfoParam()], [blockInfo]);

console.log('Finishing upgrade');
await (await upgradeGatekeeper.finishUpgrade([[], [], upgradeData], { gasLimit: 3000000 })).wait();
console.log('The upgrade has finished');
Expand Down
10 changes: 10 additions & 0 deletions core/lib/storage/src/chain/mempool/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,16 @@ impl<'a, 'c> MempoolSchema<'a, 'c> {
.as_ref()
.map(|sd| serde_json::to_value(sd).expect("failed to encode EthSignData"));

let eth_sign_data = if let Some(val) = eth_sign_data {
if val.is_null() {
None
} else {
Some(val)
}
} else {
None
};

sqlx::query!(
"INSERT INTO mempool_txs (tx_hash, tx, created_at, eth_sign_data)
VALUES ($1, $2, $3, $4)",
Expand Down

0 comments on commit 5e53d57

Please sign in to comment.