Browse Source

fix sdk compile error

tags/1.4.0^2
zhangshuang 4 years ago
parent
commit
64a1c1e2eb
2 changed files with 7 additions and 2 deletions
  1. +4
    -1
      samples/sdk-samples/src/test/java/test/com/jd/blockchain/sdk/test/SDK_Contract_Test.java
  2. +3
    -1
      samples/sdk-samples/src/test/java/test/com/jd/blockchain/sdk/test/SDK_GateWay_BatchInsertData_Test_.java

+ 4
- 1
samples/sdk-samples/src/test/java/test/com/jd/blockchain/sdk/test/SDK_Contract_Test.java View File

@@ -6,6 +6,8 @@ import java.io.File;
import java.io.FileInputStream; import java.io.FileInputStream;
import java.io.IOException; import java.io.IOException;


import com.jd.blockchain.crypto.base.DefaultCryptoEncoding;
import com.jd.blockchain.crypto.base.HashDigestBytes;
import org.junit.Before; import org.junit.Before;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
@@ -297,7 +299,8 @@ public class SDK_Contract_Test {
} }


private static HashDigest getLedgerHash() { private static HashDigest getLedgerHash() {
return new HashDigest(Base58Utils.decode(ledgerAddress));
byte[] addressBytes = Base58Utils.decode(ledgerAddress);
return new HashDigestBytes(DefaultCryptoEncoding.decodeAlgorithm(addressBytes), addressBytes);
} }


/** /**


+ 3
- 1
samples/sdk-samples/src/test/java/test/com/jd/blockchain/sdk/test/SDK_GateWay_BatchInsertData_Test_.java View File

@@ -10,6 +10,8 @@ package test.com.jd.blockchain.sdk.test;


import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;


import com.jd.blockchain.crypto.base.DefaultCryptoEncoding;
import com.jd.blockchain.crypto.base.HashDigestBytes;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;


@@ -113,7 +115,7 @@ public class SDK_GateWay_BatchInsertData_Test_ {


private HashDigest getLedgerHash() { private HashDigest getLedgerHash() {
byte[] hashBytes = Base58Utils.decode(ledgerHash); byte[] hashBytes = Base58Utils.decode(ledgerHash);
return new HashDigest(hashBytes);
return new HashDigestBytes(DefaultCryptoEncoding.decodeAlgorithm(hashBytes), hashBytes);
} }






Loading…
Cancel
Save