change index of general scription,
This commit is contained in:
parent
b2a3ae7d09
commit
33363991af
@ -5,7 +5,7 @@ import { hexToUtf8 } from 'zutils/utils/string.util'
|
||||
import logger from 'logger/logger'
|
||||
|
||||
@dbconn()
|
||||
@index({ from: 1 }, { unique: false })
|
||||
@index({ from: 1, op: 1 }, { unique: false })
|
||||
@index({ hash: 1 }, { unique: true })
|
||||
@index({ from: 1, blockTime: 1 }, { unique: false })
|
||||
@modelOptions({
|
||||
@ -41,7 +41,7 @@ export class GeneralScriptionClass extends BaseModule {
|
||||
const dataStr = hexToUtf8(event.input)
|
||||
const regexp = /data:,{\"p\":\"cf-20\",\"op\":\"(.+?)\",\"val\":\"(.+?)\"}/
|
||||
const match = dataStr.match(regexp)
|
||||
if (!match) {
|
||||
if (!match || match.length < 3) {
|
||||
logger.log('not a general scription:', event.hash)
|
||||
return
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user