Skip to content

Commit

Permalink
Fixes #113
Browse files Browse the repository at this point in the history
  • Loading branch information
erikzhang committed Aug 5, 2019
1 parent e73d2c0 commit 9d92bee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ApplicationLogs/LogReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public void OnPersist(Snapshot snapshot, IReadOnlyList<Blockchain.ApplicationExe
foreach (var appExec in applicationExecutedList)
{
JObject json = new JObject();
json["txid"] = appExec.Transaction.Hash.ToString();
json["txid"] = appExec.Transaction?.Hash.ToString();
json["trigger"] = appExec.Trigger;
json["vmstate"] = appExec.VMState;
json["gas_consumed"] = appExec.GasConsumed.ToString();
Expand All @@ -78,7 +78,7 @@ public void OnPersist(Snapshot snapshot, IReadOnlyList<Blockchain.ApplicationExe
}
return notification;
}).ToArray();
writeBatch.Put(appExec.Transaction.Hash.ToArray(), json.ToString());
writeBatch.Put((appExec.Transaction.Hash ?? snapshot.PersistingBlock.Hash).ToArray(), json.ToString());
}
db.Write(WriteOptions.Default, writeBatch);
}
Expand Down

0 comments on commit 9d92bee

Please sign in to comment.