Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
JDChain
Explorer
提交
4edfe964
E
Explorer
项目概览
JDChain
/
Explorer
通知
0
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
E
Explorer
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
4edfe964
编写于
6月 21, 2019
作者:
S
shaozhuguang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1、Fixed get consensus file error !
上级
f73a2280
变更
6
展开全部
隐藏空白更改
内联
并排
Showing
6 changed file
with
2118 addition
and
6 deletion
+2118
-6
source/contract/contract-jvm/src/main/java/com/jd/blockchain/contract/jvm/JavaContractCode.java
...java/com/jd/blockchain/contract/jvm/JavaContractCode.java
+2
-2
source/deployment/deployment-gateway/src/main/resources/config/gateway.conf
...deployment-gateway/src/main/resources/config/gateway.conf
+2
-1
source/deployment/deployment-gateway/src/main/resources/docs/api_doc_cn_1.4.MD
...loyment-gateway/src/main/resources/docs/api_doc_cn_1.4.MD
+2083
-0
source/deployment/deployment-peer/src/main/resources/config/init/ledger.init
...eployment-peer/src/main/resources/config/init/ledger.init
+1
-1
source/tools/tools-initializer/src/main/java/com/jd/blockchain/tools/initializer/LedgerInitProperties.java
...jd/blockchain/tools/initializer/LedgerInitProperties.java
+7
-2
source/utils/utils-common/src/main/java/com/jd/blockchain/utils/io/FileUtils.java
...n/src/main/java/com/jd/blockchain/utils/io/FileUtils.java
+23
-0
未找到文件。
source/contract/contract-jvm/src/main/java/com/jd/blockchain/contract/jvm/JavaContractCode.java
浏览文件 @
4edfe964
...
...
@@ -68,7 +68,7 @@ public class JavaContractCode extends AbstractContractCode {
@Override
public
BytesValue
processEvent
(
ContractEventContext
eventContext
)
{
if
(
LOGGER
.
isDebugEnabled
())
{
LOGGER
.
debug
(
"Start processing event
[%s] of contract[%s]
..."
,
eventContext
.
getEvent
(),
address
.
toString
());
LOGGER
.
debug
(
"Start processing event
{} of contract{}
..."
,
eventContext
.
getEvent
(),
address
.
toString
());
}
try
{
return
codeModule
.
call
(
new
ContractExecution
(
eventContext
));
...
...
@@ -78,7 +78,7 @@ public class JavaContractCode extends AbstractContractCode {
throw
ex
;
}
finally
{
if
(
LOGGER
.
isDebugEnabled
())
{
LOGGER
.
debug
(
"End processing event
[%s] of contract[%s]
. "
,
eventContext
.
getEvent
(),
address
.
toString
());
LOGGER
.
debug
(
"End processing event
{} of contract{}
. "
,
eventContext
.
getEvent
(),
address
.
toString
());
}
}
}
...
...
source/deployment/deployment-gateway/src/main/resources/config/gateway.conf
浏览文件 @
4edfe964
#网关的HTTP服务地址;
#网关的HTTP服务地址
,建议直接使用0.0.0.0
;
http
.
host
=
0
.
0
.
0
.
0
#网关的HTTP服务端口;
http
.
port
=
8081
...
...
@@ -18,6 +18,7 @@ peer.providers=com.jd.blockchain.consensus.bftsmart.BftsmartConsensusProvider
#数据检索服务对应URL,格式:http://{ip}:{port},例如:http://127.0.0.1:10001
#若该值不配置或配置不正确,则浏览器模糊查询部分无法正常显示
#数据检索服务模块(Argus)需单独部署,若不部署其他功能仍可正常使用
data
.
retrieval
.
url
=
http
://
127
.
0
.
0
.
1
:
10001
#默认公钥的内容(Base58编码数据);
...
...
source/deployment/deployment-gateway/src/main/resources/docs/api_doc_cn_1.4.MD
0 → 100644
浏览文件 @
4edfe964
此差异已折叠。
点击以展开。
source/deployment/deployment-peer/src/main/resources/config/init/ledger.init
浏览文件 @
4edfe964
...
...
@@ -10,7 +10,7 @@ created-time=2019-08-01 14:26:58.069+0800
#共识服务提供者;必须;
consensus.service-provider=com.jd.blockchain.consensus.bftsmart.BftsmartConsensusProvider
#共识服务的参数配置;必须;
#共识服务的参数配置;
推荐使用绝对路径;
必须;
consensus.conf=classpath:bftsmart.config
#密码服务提供者列表,以英文逗点“,”分隔;必须;
...
...
source/tools/tools-initializer/src/main/java/com/jd/blockchain/tools/initializer/LedgerInitProperties.java
浏览文件 @
4edfe964
...
...
@@ -141,7 +141,8 @@ public class LedgerInitProperties {
public
static
LedgerInitProperties
resolve
(
String
initSettingFile
)
{
Properties
props
=
FileUtils
.
readProperties
(
initSettingFile
,
"UTF-8"
);
return
resolve
(
props
);
File
realFile
=
new
File
(
initSettingFile
);
return
resolve
(
realFile
.
getParentFile
().
getPath
(),
props
);
}
public
static
LedgerInitProperties
resolve
(
InputStream
in
)
{
...
...
@@ -150,6 +151,10 @@ public class LedgerInitProperties {
}
public
static
LedgerInitProperties
resolve
(
Properties
props
)
{
return
resolve
(
null
,
props
);
}
public
static
LedgerInitProperties
resolve
(
String
dir
,
Properties
props
)
{
String
hexLedgerSeed
=
PropertiesUtils
.
getRequiredProperty
(
props
,
LEDGER_SEED
).
replace
(
"-"
,
""
);
byte
[]
ledgerSeed
=
HexUtils
.
decode
(
hexLedgerSeed
);
LedgerInitProperties
initProps
=
new
LedgerInitProperties
(
ledgerSeed
);
...
...
@@ -166,7 +171,7 @@ public class LedgerInitProperties {
initProps
.
consensusProvider
=
PropertiesUtils
.
getRequiredProperty
(
props
,
CONSENSUS_SERVICE_PROVIDER
);
String
consensusConfigFilePath
=
PropertiesUtils
.
getRequiredProperty
(
props
,
CONSENSUS_CONFIG
);
try
{
File
consensusConfigFile
=
ResourceUtils
.
getFile
(
consensusConfigFilePath
);
File
consensusConfigFile
=
FileUtils
.
getFile
(
dir
,
consensusConfigFilePath
);
initProps
.
consensusConfig
=
FileUtils
.
readProperties
(
consensusConfigFile
);
}
catch
(
FileNotFoundException
e
)
{
throw
new
IllegalArgumentException
(
...
...
source/utils/utils-common/src/main/java/com/jd/blockchain/utils/io/FileUtils.java
浏览文件 @
4edfe964
...
...
@@ -16,6 +16,7 @@ import java.io.Reader;
import
java.util.ArrayList
;
import
java.util.Properties
;
import
com.jd.blockchain.utils.PathUtils
;
import
org.springframework.util.ResourceUtils
;
/**
...
...
@@ -482,4 +483,26 @@ public class FileUtils {
}
return
path
.
delete
();
}
/**
* 获取指定路径和位置的文件信息
*
* @param dir
* 指定路径,不要以"/"结尾
* @param resourceLocation
* 文件位置信息,可支持绝对路径、相对路径(相对dir)、classpath:前缀
* @return
*
* @throws FileNotFoundException
*/
public
static
File
getFile
(
String
dir
,
String
resourceLocation
)
throws
FileNotFoundException
{
if
(
resourceLocation
.
startsWith
(
ResourceUtils
.
CLASSPATH_URL_PREFIX
))
{
return
ResourceUtils
.
getFile
(
resourceLocation
);
}
if
(
resourceLocation
.
startsWith
(
PathUtils
.
PATH_SEPERATOR
))
{
return
new
File
(
resourceLocation
);
}
String
totalPath
=
PathUtils
.
concatPaths
(
dir
,
resourceLocation
);
return
new
File
(
totalPath
);
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录