1
- import { IdentityForRequirements } from './BlockchainService' ;
2
- "use strict" ;
1
+ import { IdentityForRequirements } from './BlockchainService' ;
3
2
import { Server } from "../../server"
4
3
import { GlobalFifoPromise } from "./GlobalFifoPromise"
5
4
import { BlockchainContext } from "../lib/computation/BlockchainContext"
6
5
import { ConfDTO } from "../lib/dto/ConfDTO"
7
6
import { FileDAL } from "../lib/dal/fileDAL"
8
7
import { QuickSynchronizer } from "../lib/computation/QuickSync"
9
8
import { BlockDTO } from "../lib/dto/BlockDTO"
10
- import { DBIdentity } from "../lib/dal/sqliteDAL/IdentityDAL"
11
9
import { DBBlock } from "../lib/db/DBBlock"
12
10
import { GLOBAL_RULES_HELPERS } from "../lib/rules/global_rules"
13
11
import { parsers } from "../lib/common-libs/parsers/index"
@@ -18,6 +16,8 @@ import {LOCAL_RULES_FUNCTIONS} from "../lib/rules/local_rules"
18
16
import { Switcher , SwitcherDao } from "../lib/blockchain/Switcher"
19
17
import { OtherConstants } from "../lib/other_constants"
20
18
19
+ "use strict" ;
20
+
21
21
const _ = require ( 'underscore' ) ;
22
22
const constants = require ( '../lib/constants' ) ;
23
23
@@ -206,6 +206,11 @@ export class BlockchainService extends FIFOService {
206
206
while ( ! added && i < potentials . length ) {
207
207
const dto = BlockDTO . fromJSONObject ( potentials [ i ] )
208
208
try {
209
+ if ( dto . issuer === this . conf . pair . pub ) {
210
+ for ( const tx of dto . transactions ) {
211
+ await this . dal . removeTxByHash ( tx . hash ) ;
212
+ }
213
+ }
209
214
const addedBlock = await this . mainContext . checkAndAddBlock ( dto )
210
215
added = true
211
216
this . push ( {
0 commit comments