mirror of
https://github.com/status-im/nimbus-eth1.git
synced 2025-01-13 13:55:45 +00:00
db8c5b90bd
* Cleanup unneeded stateless and block witness code. Keeping MultiKeys which is used in the eth_getProofsByBlockNumber RPC endpoint which is needed for the Fluffy state network bridge. * Rename generateWitness flag to collectWitnessData to better describe what the flag does. We only collect the keys of the touched accounts and storage slots but no block witness generation is supported for now. * Move remaining stateless code into nimbus directory. * Add vmstate parameter to ChainRef to fix test. * Exclude *.in from check copyright year --------- Co-authored-by: jangko <jangko128@gmail.com>
28 lines
932 B
Bash
28 lines
932 B
Bash
#!/usr/bin/env bash
|
|
|
|
# Copyright (c) 2023-2024 Status Research & Development GmbH. Licensed under
|
|
# either of:
|
|
# - Apache License, version 2.0
|
|
# - MIT license
|
|
# at your option. This file may not be copied, modified, or distributed except
|
|
# according to those terms.
|
|
|
|
excluded_files="config.yaml|.gitmodules|.gitignore"
|
|
excluded_extensions="json|md|png|txt|toml|gz|key|rlp|era1|cfg|py|sh|in"
|
|
|
|
current_year=$(date +"%Y")
|
|
outdated_files=()
|
|
while read -r file; do
|
|
if ! grep -qE 'Copyright \(c\) .*'$current_year' Status Research & Development GmbH' "$file"; then
|
|
outdated_files+=("$file")
|
|
fi
|
|
done < <(git diff --name-only --diff-filter=AM --ignore-submodules HEAD^ HEAD | grep -vE '(\.('$excluded_extensions')|'$excluded_files')$' || true)
|
|
|
|
if (( ${#outdated_files[@]} )); then
|
|
echo "The following files do not have an up-to-date copyright year:"
|
|
for file in "${outdated_files[@]}"; do
|
|
echo "- $file"
|
|
done
|
|
exit 2
|
|
fi
|