contract/business/NotarizeOps.js
/**
     * 
     * @param {BeanDataBlock} blockData Data block with the set of process information.
     */
@param {BeanDataBlock} blockData Data block with the set of process information.
@param { BeanDataBlock } blockData Data block with the set of process information .
async validateIssuerBlock(blockData) {
        var issuerOK = await this.verifyIssuer(blockData);
        logWrite('[validateIssuerBlock] issuerOK: ' + issuerOK);
        var recipientsOK = await this.validateIssuerRecipients(blockData);
        logWrite('[validateIssuerBlock] recipientsOK: ' + recipientsOK);
        var datetimeOK = await this.validateIssuerDateTime(blockData);
        logWrite('[validateIssuerBlock] datetimeOK: ' + datetimeOK);
        var merkleRootIssuerTest = BeanDataBlock.calculateMerkleRootIssuer(blockData);
        var merkleRootIssuer = blockData.merkleRootIssuer;
        if (merkleRootIssuer != merkleRootIssuerTest) {
            logWrite('[validateIssuerBlock] Issuer Merkle Root Hash Invalid');
            return false;
        }
        logWrite('[validateIssuerBlock] Issuer Merkle Root Hash Is Valid');
        let valueToReturn = false;
        if (issuerOK && recipientsOK && datetimeOK) {
            valueToReturn = true;
        }
        return valueToReturn;
    }
async validateIssuerBlock ( blockData ) { var issuerOK = await this . verifyIssuer ( blockData ) ; logWrite ( '[validateIssuerBlock] issuerOK: ' + issuerOK ) ; var recipientsOK = await this . validateIssuerRecipients ( blockData ) ; logWrite ( '[validateIssuerBlock] recipientsOK: ' + recipientsOK ) ; var datetimeOK = await this . validateIssuerDateTime ( blockData ) ; logWrite ( '[validateIssuerBlock] datetimeOK: ' + datetimeOK ) ; var merkleRootIssuerTest = BeanDataBlock . calculateMerkleRootIssuer ( blockData ) ; var merkleRootIssuer = blockData . merkleRootIssuer ; if ( merkleRootIssuer != merkleRootIssuerTest ) { logWrite ( '[validateIssuerBlock] Issuer Merkle Root Hash Invalid' ) ; return false ; } logWrite ( '[validateIssuerBlock] Issuer Merkle Root Hash Is Valid' ) ; let valueToReturn = false ; if ( issuerOK && recipientsOK && datetimeOK ) { valueToReturn = true ; } return valueToReturn ; }
@param {BeanDataBlock} blockData Data block with the set of process information.
@param { BeanDataBlock } blockData Data block with the set of process information .
// Issuer: Validar Dados --------------------------- // Recipients: Validar Dados --------------------------- // Date-Time: Validar Dados --------------------------- // Issuer Merkle Hash: Validar Dados --------------------------- // stop here