* Handle PK violation issue for transaction notification. The transaction might be replayed due to validator restart. (cherry picked from commit d6de4a2f4ecbbf0bc42369d638dc235b925b0759) Co-authored-by: Lijun Wang <83639177+lijunwangs@users.noreply.github.com>
This commit is contained in:
parent
f31593bfbe
commit
a70eb098f4
@ -488,7 +488,15 @@ impl SimplePostgresClient {
|
||||
) -> Result<Statement, AccountsDbPluginError> {
|
||||
let stmt = "INSERT INTO transaction AS txn (signature, is_vote, slot, message_type, legacy_message, \
|
||||
v0_loaded_message, signatures, message_hash, meta, updated_on) \
|
||||
VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10)";
|
||||
VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) \
|
||||
ON CONFLICT (slot, signature) DO UPDATE SET is_vote=excluded.is_vote, \
|
||||
message_type=excluded.message_type, \
|
||||
legacy_message=excluded.legacy_message, \
|
||||
v0_loaded_message=excluded.v0_loaded_message, \
|
||||
signatures=excluded.signatures, \
|
||||
message_hash=excluded.message_hash, \
|
||||
meta=excluded.meta, \
|
||||
updated_on=excluded.updated_on";
|
||||
|
||||
let stmt = client.prepare(stmt);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user