Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/src/api/routes/api/v1/epochs/SubmitEpochRoute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ export class SubmitEpochRoute extends Route<
// Each hex pair represents one byte, so divide by 2
const graffitiByteLength = graffitiHex.length / 2;

if (graffitiByteLength > OPNetConsensus.consensus.EPOCH.GRAFFITI_LENGTH) {
if (graffitiByteLength > OPNetConsensus.consensus.EPOCH.GRAFFITI_LENGTH - 4) {
throw new Error(
`Graffiti cannot exceed ${OPNetConsensus.consensus.EPOCH.GRAFFITI_LENGTH} bytes. ` +
`Received ${graffitiByteLength} bytes`,
Expand Down
8 changes: 1 addition & 7 deletions src/src/blockchain-indexer/processor/epoch/EpochManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,7 @@ import { DataConverter } from '@btc-vision/bsi-common';
import { Binary } from 'mongodb';
import { EpochDifficultyConverter } from '../../../poc/epoch/EpochDifficultyConverter.js';
import { EpochValidator } from '../../../poc/epoch/EpochValidator.js';
import {
Attestation,
AttestationType,
EpochData,
EpochMerkleTree,
} from '../block/merkle/EpochMerkleTree.js';
import { Attestation, AttestationType, EpochData, EpochMerkleTree, } from '../block/merkle/EpochMerkleTree.js';
import {
EpochSubmissionWinner,
IEpochSubmissionsDocument,
Expand Down Expand Up @@ -241,7 +236,6 @@ export class EpochManager extends Logger {
checkSumRoots,
submissions,
witnesses,
//task,
epochNumber,
lastEpoch,
attestationChecksumRoot,
Expand Down
Loading